title: CakePHP paginate and order by
body: <p>It feels like I've tried everything so I now come to you.</p>
  
  <p>I am trying to order my data but it isn't going so well, kinda new to Cake.</p>
  
  <p>This is my code:</p>
  
  <pre><code>$this-&gt;set('threads', $this-&gt;paginate('Thread', array(
          'Thread.hidden' =&gt; 0,
          'Thread.forum_category_id' =&gt; $id,
          'order' =&gt; array(
              'Thread.created' =&gt; 'desc'
          )
      )));
  </code></pre>
  
  <p>It generates an SQL error and this is the last and interesting part:</p>
  
  <pre><code>AND `Thread`.`forum_category_id` = 12 AND order = ('desc') ORDER BY `Thread`.`created` ASC LIMIT 25
  </code></pre>
  
  <p>How can I fix this? The field created obviously exists in the database. :/</p>