title: CakePHP Empty BelongsTo and hasMany relations array
body: <p>I've been working this issue this whole weekend, and I can't seem to find a solution.
  I have three models:</p>
  
  <p>User Class:</p>
  
  <pre><code>class User extends AppModel {
        var $hasMany = array('Like','Event');
      }
  </code></pre>
  
  <p>Like Class:</p>
  
  <pre><code>class Like extends AppModel {
  
        var $belongsTo = array ('Event','User');  
      }
  </code></pre>
  
  <p>Event Class:</p>
  
  <pre><code>class Event extends AppModel {
       var $belongsTo = 'User';
       var $hasMany = 'Like';
      }
  </code></pre>
  
  <p>This is my find statement:</p>
  
  <pre><code>$this-&gt;set('likes', $this-&gt;Like-&gt;find('all', array(
                         'contain'=&gt;array(
                                     'User','Event')));
  </code></pre>
  
  <p>My like table is:</p>
  
  <pre><code>id(int 10)
  user_id(int 10)
  event_id(int 10)
  </code></pre>
  
  <p>My user table has:</p>
  
  <pre><code>id(int 10)  
  plus all regular user related column
  </code></pre>
  
  <p>My event table has:</p>
  
  <pre><code>id(int 10)  
  user_id (int 10)
  Plus all other event related columns
  </code></pre>
  
  <p>NOW THE PROBLEM:</p>
  
  <pre><code>[0]
     [Like]
           id:77
           user_id:30
           event_id:130
     [Event]
            id(null)
            user_id(null)
            title(null)
            date(null)
            etc......
     [User]
            id:30
            email:********@gmail.com
            password:**********************
            created:2013-07-07 23:45:13
            modified:2013-07-07 23:45:13
            etc.........
  </code></pre>
  
  <p>This is my query:</p>
  
  <pre><code>SELECT `Like`.`id`, `Like`.`user_id`, `Like`.`event_id`, `Event`.`id`, `Event`.`user_id`,     `Event`.`title`, `Event`.`date`, `Event`.`price_advance`, `Event`.`price_door`,    `Event`.`price_vip`, `Event`.`created`, `Event`.`bcg_img`, `Event`.`event_info`, `Event`.`event`, `Event`.`phone1`, `Event`.`phone2`, `Event`.`promoter`, `User`.`id`, `User`.`email`, `User`.`password`, `User`.`created`, `User`.`modified`, `User`.`isAdmin`, `User`.`verified`, `User`.`full_name` FROM `quadb`.`likes` AS `Like` LEFT JOIN `quadb`.`eventss` AS `Event` ON (`Like`.`event_id` = `Event`.`id`) LEFT JOIN `quadb`.`users` AS `User` ON (`Like`.`user_id` = `User`.`id`) WHERE 1 = 1
  </code></pre>
  
  <p>I don't know why my event array is coming back null. Any help will be greatly appreciated.</p>
  
  <p><strong>EDIT</strong>
  After changing the find code to add an order clause, it magically works, I don't know exactly why:</p>
  
  <pre><code>$this-&gt;set('likes', $this-&gt;Like-&gt;find('all', array(
                         'order' =&gt; array('Like.created' =&gt; 'DESC'),
                         'contain'=&gt;array('Quad'))));
  </code></pre>