title: how do i see cakephp database save errors?
body: <p>if i have a cake php saveAll method like so:</p>
  
  <pre><code>if ($this-&gt;Video-&gt;saveAll($this-&gt;data)){
      ... // stuff that never happens, sadly
  } else {
      ...
      $this-&gt;Session-&gt;setFlash('boo! hss! error here');
  }
  </code></pre>
  
  <p>how do i print out the database error? I tried:</p>
  
  <pre><code>    $this-&gt;Session-&gt;setFlash('boo! hss! error here' . print_r($this-&gt;Video-&gt;validationErrors,true);
  </code></pre>
  
  <p>but that didn't work (it just showed me an empty array)</p>
  
  <p>cheerio!</p>
  
  <p>UPDATE:
  ah. So, the problem is that, while <em>normally</em> i'd get the database error, i was using the old prg mechanism, and cake doesn't (magically) show the db errors on redirect pages.</p>
  
  <p>Fair enough, but in the future, how the heck am i meant to see the db errors on a redirect page (that is, the question still stands, its just that most people probably just SEE the error, and don't need to do anything to get it)</p>