Hi

I am trying to set my contain array from within the models beforeFind
() callback so a certain model is always contained. I have the
following code:

        function beforeFind($queryData) {
                // Always contain the client user
                if(empty($queryData['contain']['ClientUser'])) {
                        $queryData['contain']['ClientUser']['fields'] = array
('ClientUser.user_group_id');
                }
                return $queryData;
        }

should this not work?

At the moment the find operations just ignore this.

Any ideas?
--~--~---------~--~----~------------~-------~--~----~
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