title: CakePHP: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'Post' in 'where clause'
body: <p>I have the following code to show a list of posts that also contains information from the author user and profile. The profile table has no direct link to posts and is linked via the user table.</p>
  
  <pre><code>public function index()
  {
      $posts = $this-&gt;Post-&gt;find('all',null,array('contain'=&gt;array('User'=&gt;'Profile')));
  
      $this-&gt;set('posts',$this-&gt;paginate($posts));
  }
  </code></pre>
  
  <p>However I am getting this error:</p>
  
  <pre><code> SQLSTATE[42S22]: Column not found: 1054 Unknown column 'Post' in 'where clause'
  </code></pre>
  
  <p>Any ideas what's the problem here? Thanks</p>