It seems afterFind methods on models who are being fetched by recursive
associations >1 are not being run.
Is this a feature, or an error?

Example:
Category hasMany Award
Award belongsTo Category & hasMany Nominee
Nominee belongsTo Award & hasMany Vote
Vote belongsTo Nominee & belongsTo User

If I findAll on Category with recursive>1 (2, in this example) I get a
data set containing what I'd expect it to, but if I place a debug
statement in the afterFind method of each model, only the first two
recursions are called - in this case:

Award AfterFind Called
Award AfterFind Called
Category Afterfind Called

I would expect this to be:

Nominee AfterFind Called (*x)
Award AfterFind Called (*x)
Category Afterfind Called

Could someone explain to me the possible reasons for this?  Is it a
feature?

There is a (closed) trac for it here:
https://trac.cakephp.org/ticket/648
and a post describing the same issue here:
http://groups.google.com/group/cake-php/browse_thread/thread/373bc6dca0037c34/c6805f674e799064

I made a previous post on this, but thought the problem was of my own
making because of how I was iterating through the result data - but
after repeated frustrating attempts, I finally thought to add a debug
to check the afterFind methods were all actually being run, to find
only the first two levels are so.


--~--~---------~--~----~------------~-------~--~----~
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