Hi to all the bakers...

Scenario:
model1 hasMany model2
model2 belongsto model1

I need to display a list: I only need to retrieve the following fields:
let's say model1.field1, model1.field2 and model2.field1

but using

$this->set('results',
$this->Model1->findAll(null,array('model1.field','model1.field2','model2.field1'));

complains that model2.field1 is not a field in the model1 table
(obviously is he not!)

Am I doing something wrong or it's not possible to do so automagically
and I have to use a custom sql query?

thanks !


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to