Wow, that's a tough one.  The only thing I can think of is removing
three or four associations from $belongsTo, and doing them manually
Menu::afterFind( ), which would look something like this (keep in mind,
this code is off-the-cuff and completely untested):

class Menu extends AppModel {
 /// ...................
 /// Other stuff here
 /// ...................

   function afterFind ($results) {
      $product = new Enhancement( );
      foreach ($results as $key => $val) {
         $tmp = $product->find(array('Enhancement.ID' =>
$val['Menu']['product_thirtytwo']), null, null, null, null, 0);
         $results[$key]['ProductThirtyTwo'] = $tmp['Enhancement'];

         $tmp = $product->find(array('Enhancement.ID' =>
$val['Menu']['product_thirtythree']), null, null, null, null, 0);
         $results[$key]['ProductThirtyThree'] = $tmp['Enhancement'];

         $tmp = $product->find(array('Enhancement.ID' =>
$val['Menu']['product_thirtyfour']), null, null, null, null, 0);
         $results[$key]['ProductThirtyFour'] = $tmp['Enhancement'];
      }
     return $results;
   }
}


That should work for now.  I am opening an Enhancement ticket that
would allow you to force a separate query for an association.  Look for
this feature in 2.0.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~----------~----~----~----~------~----~------~--~---

Reply via email to