title: CakePHP - How to retrieve deeply associated data?
body: <p>I have the following models:</p>
  
  <p><strong>User:</strong></p>
  
  <ul>
  <li>hasOne Profile, Page</li>
  <li>hasMany Comment</li>
  </ul>
  
  <p><strong>Comment:</strong></p>
  
  <ul>
  <li>belongsTo User, Page, Profile</li>
  </ul>
  
  <p><strong>Page:</strong></p>
  
  <ul>
  <li>belongsTo User</li>
  <li>hasMany Comment</li>
  </ul>
  
  <p><strong>Profile:</strong></p>
  
  <ul>
  <li>belongsTo User</li>
  </ul>
  
  <p>When I retrieve a page, I want to get the associated Comments, and for each comment I want the Profile.</p>
  
  <p>My comments table has fields page_id and user_id.
  My profile table has user_id.</p>
  
  <p>So, I assume I need to do something like </p>
  
  <pre><code>Comment belongsTo 
  'Profile' =&gt; array(
          'conditions' =&gt; array('Profile.user_id' =&gt; 'Comment.user_id')
      )
  </code></pre>
  
  <p>but that's not working - it returns a blank profile record.</p>
  
  <p>I am using CakePHP 2.0.</p>