Hello vb13,

> Cake processes hasMany and hasOne, belongsTo differently. In the case
> of hasOne and belongsTo, when, say, 2 models are involved, they
> generate 1 query with a join, and then retrieve data in one shot.
>
> In the case  when model A hasMany Model B (for example Machine and
> MachineContact) it looks like cake will first retrieve a query for
> Machine data and then for each machine there will be one query to
> retrieve MachineContract.
>
> So there are 2 logical branches and each callsafterFindslightly
> different.

Thank you for sharing your research. In fact, I do understand your
point. What is not making sense to me is that afterFind() is being
called many times for a single read(). Anyway, even though cake
processes things differently (for different relationships) the
resulting array should be equal for all the cases, unless a flag is
given just like how it happens with $primary.

So we have here either a bug or a "work as expected" situation that is
not clear to me.

I am back to this question again, will keep in touch if i do any
progress.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to