title: Kohana query builder return
body: <p>We have a CMS written in Kohana 2.3.x (yes, we know it is an old one).
  When I use the query builder like this:</p>
  
  <pre><code>$obj = ORM::factory('product')-&gt;where(array_of_wheres)-&gt;find_all()
  </code></pre>
  
  <p>than the <code>$obj</code> will be an <code>ORM_Iterator</code>.</p>
  
  <p>But when I write something like this:</p>
  
  <pre><code>$obj = ORM::factory('product');
  if($something)
      $obj-&gt;where(array_of_wheres);
  else
      $obj-&gt;where(array_of_other_wheres);
  $obj-&gt;find_all();
  </code></pre>
  
  <p>Than the <code>$obj</code> will be a <code>Product_Model</code> instead of <code>ORM_Iterator</code>.</p>
  
  <p>Can someone explain why is this happening?</p>
  
  <p>Thanks, Dave.</p>