I have a users model and a photos model,

 

Class users{

 

Var belongsto=array(

   'Photos'

}

 

You get the idea, 

 

When I run a $this->Some
Model>find('all',array('contain'=>array('User','User.Photo')))

 

It breaks this up into 2 sql statements so even with a limited amount of 20
results, there's a lot of redundancy and it costs time and processing.  I'm
about to rewrite all my inefficient finds into queries that have my own
custom joins.  

 

Does anyone have suggestions how to get the photos table to show up in the
results without cake making a separate query?

 

Alan

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to