I would do two finds and merge the array afterwards. Assuming ModelA hasOne 
ModelB, do a find on ModelA, pick up the value of the matching id in ModelB, 
then do a find first on ModelB where id = $id.

Jeremy Burns
[email protected]


On 14 May 2010, at 12:06, [email protected] wrote:

> Hi
> I have to define a hasOne relation between model (model A) with DB
> like datasource a model (model B) with  datasource that isn't a DB.
> If I have this controller operation:
> 
>               pr($this->ModelA->find('all'));
>               die();
> 
> I have noted that CakePHP products a single sql query to find data.
> How can I manage this situation?
> What is the structure to manage this situation?
> Many Thanks
> 
> 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

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