Hi all
I've found a possible Bug with ContainableBehaviour using associated
Plugin Models within a find operation.
<code>
$data = $this->find('first', array(
'fields' => 'User.name, User.created',
'conditions' => array('User.name' => $name),
'contain' => array(
'Blog',
'BlogEntry.Blog',
),
'recursive' => 3
));
</code>
Setup:
app/models/user.php: hasMany => Blog, BlogEntry
app/plugins/blogging/models/blog.php: belongsTo => User / hasMany =>
BlogEntry
app/plugins/blogging/models/blog_entry.php: belongsTo => User, Blog
Expected:
All "Blog", and all "BlogEntry" with their belonging "Blog"
Result:
"Blog" is okay, but "BlogEntry" is shown without related data.
[Blog] => array()
[BlogEntry] => array()
If i move "Blog" and "BlogEntry" into /app/models the find method
retrieves the data as expected.
[Blog] => array()
[BlogEntry] => array(.. [Blog] => array())
I guess containable does not fully initialize the Model from a plugin
so the is_object condition within containable.php fails and thus
throwing "A not associated with B"
Anyone expirienced the same/tried this?
Best,
Kjell
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---