title: Cakephp pagination with or condition
body: <p>I want to be able to put 'or' condition inside a foreach loop when defining pagination variable at the controller like below:</p>
  
  <pre><code>foreach($p as $ps){
  $this-&gt;paginate = array(
                  'or' =&gt; array(
                      array('Petition.commune_id LIKE' =&gt; $commune_ids['Commune']['id'] . ","),
  
                      ),Recipe
                  'limit' =&gt; 10
              );
  
  }
  </code></pre>
  
  <p>I know above is wrong but I've compiled the codes for demonstration purposes. Is there a way we can do this in cake?</p>
  
  <p>I need to loop because I want to be able to use ids from another table (which has been fetched as an array by find method) and use this for looping in the current table which is Petitions table. $commune_ids['Commune']['id'] is what I need to loop through as or value. Alternatively the query will be like: </p>
  
  <pre><code>SELECT * FROM petitions WHERE commune_id = 971 OR commune_id = 123 OR commune_id = 321 OR commune_id = 432 
  </code></pre>
  
  <p>but of course I can do this in find function but I would like to paginate this results...</p>