title: paginating joined table with cakephp
body: <p>I have several actions that all paginate properly, but I can't figure out what's going on with this "joined" query. It's displaying all of the posts in my table, not just the 3 at a time like I specified. </p>
  
  <pre><code> public function index() { 
      $this-&gt;paginate = array(
      'joins' =&gt; array(
          array(
              'table' =&gt; 'Users',
              'type' =&gt; 'inner',
              'limit' =&gt; 3,
              'fields' =&gt; array('User.username'),
              'conditions' =&gt; array('Users.id = Post.user_id')
              )
          ));
      $posts = $this-&gt;paginate('Post');
      $this-&gt;set(compact('posts'));
  }
  </code></pre>
  
  <p><strong>edit below here</strong></p>
  
  <pre><code>table Users
  id | username | password
  
  table Posts
  id | body | user_id | created
  </code></pre>
  
  <p>This function works but it doesn't paginate.</p>
  
  <pre><code>public function index() { 
    $options['joins'] = array(
      array('table' =&gt; 'Users',
          'type' =&gt; 'inner',
          'fields' =&gt; array('User.username'),
          'conditions' =&gt; array('Users.id = Post.user_id')
          )
      );
      $post = $this-&gt;Post-&gt;find('all', $options);
      $this-&gt;set('posts', $post);
  }
  </code></pre>