I have a users model and a photos model.
The model for users is set up that it "hasMany" Photos and "belongsTo"
Photo
During this code.
$this->Profile->Behaviors->attach('Containable');
$this->Profile->recursive=2;
$this->Profile->User->Photo->recursive=0;
$this->Profile->User->unbindModel(array('hasMany'=>('Photo')));
$this->Profile->contain('User','User.Photo.');
$profile=$this->Profile->read(null, $id);
pr($profile);
I get every photo in the database for the user and the only one I want is
the "belongsTo"
The unbind model doesn't appear to be working.
Help Please!!!
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