title: unbindModel call in CakePhp. How does it work?
body: <p>How does unbindModel happen in cake?</p>
  
  <pre><code>$this-&gt;User-&gt;unbindModel(array('hasAndBelongsToMany' =&gt; array('Friend')));
  </code></pre>
  
  <p>I wrote this in the beginning of a function. But still it queries the 'Friend' model. There was a call to paginate() in the middle of the function. So I thought the paginator might be generating the queries.</p>
  
  <p>I did added an unbindModel call just before paginate and it now works.</p>
  
  <pre><code>$this-&gt;User-&gt;unbindModel(array('hasAndBelongsToMany' =&gt; array('Friend')));
  $user = $this-&gt;paginate("User", array("User.first_name LIKE" =&gt; $user["User"]["first_name"]));
  </code></pre>
  
  <p>Does unbindModel unbind every query? or does it unbind during the entire function call?</p>