title: CakePHP: $this->paginate() and server hangs
body: <p>So, I have this piece of code:</p>
  
  <pre><code>class ProductsController extends AppController {
  var $name = 'Products';
  var $paginate = array('limit' =&gt; 5);    // sets the number of entries per page  
  
  
  function index() {      
      $this-&gt;Product-&gt;recursive = 0;
      // works up to here fine
      $this-&gt;set('products', $this-&gt;paginate());  // makes the browser hangs
      }
  }
  </code></pre>
  
  <p>When I go to <code>../products/index</code> the browser just kind of hangs. It tries to load for minutes without giving any error messages, and I'm forced to restart Apache (XAMPP) or wait out a 60 seconds. The problem seems to be with <code>$this-&gt;paginate()</code> and all of the associations with Product controller. It has 2 belongsTo (belongs to smaller tables) and 1 hasOne (has one large table, 20K+ rows). </p>
  
  <p>I added a <code>hasOne</code> relationship to the product model, and this seems to be causing the hanging. When I remove this relationship, the URL works and displays all items. However, this <code>hasOne</code> relationship does not cause any errors when I do for example, <code>../products/view/1</code>. </p>
  
  <p>Any idea on how to make this manageable?</p>