Hi,
Let's say I have two models Property and Picture. One Property can
have many Pictures. So I make two models like this:
class Property extends AppModel {
var $name = "Property";
var $hasMany = array('Picture' =>
array('className' => 'Picture',
'foreignKey' => 'property_id')
);
}
class Picture extends AppModel {
var $name = "Picture";
var $belongsTo = array('Property' =>
array('className' => 'Property',
'conditions' => '',
'order' => '',
'foreignKey' => 'property_id'
)
);
}
Now I want to use $this->Property->findAll with some conditions and
return ALL the Property model, but NOT ALL the picture Model. That is
because the Picture model have large image data that I don't need. I
just need the picture ID returned.
What is the best way to accomplish this?
Regards
--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---