spooky... I came across the identical thing just today. And (I think)
the simple answer is that it is because your Article belongsTo User.
I've also used containable for a while and assumed that chaining
arrays of associations as in your example works (restricts the db
query) in either 'direction', but having tested it out a bit this
doesn't seem to be the case. If you were to have 'contain' => array
('Article' => array('Favorite')) then that works fine coz Article
hasMany Favorites. The thing is I'm surprised I've not noticed this
before when using 'contain', it's just because I was paginating a
whole heap of records and it was taking forever that I even bothered
to look at the actual data. Now I don't know if this is intended
behaviour, but it sure is a pain in the rear! A case for custom
pagination function with plain old SQL query in my model for sure.
Happy if someone tells me I'm wrong.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---