Hi, I have noticed some new warnings and notices with afterFind since RC3 (I think). The more look into it, the more confused I become. Exactly how is afterFind called? Is there a list of some kind that covers the different types of layout that the data can have? $primary true/false does not exactly cover it all.
I have so far ended up with a bunch of if's to determine where my field is located in the data-hierarchy. This looks so messy that I am sure there is a better way. I just can't find any good summary of how to write a good afterFind. Also I noticed that afterFind is called twice for each record returned. The first time it is called for each record in turn and then it rounds it off by calling afterFind again with all records together. This last one presumably happens from the "primary" model? The model I use this on (to unserialize() a field) is always loaded as an association but I still get two different types of data-structure to deal with. The first ones look like this (where data is the field need to unserialize): $data[0][$this->alias]['data'] And the last one looks like this (where i is any number från 0 to the total number of records) $data[0][$this->alias][i]['data'] Since I imagine when I start returning this data from a "find all" I would get a few more version of the data-structure? Does anyone know if a good article on this subject? /Martin --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
