In your find() queries, you can add a parameter: 'callbacks' => false http://book.cakephp.org/view/73/Retrieving-Your-Data
On Feb 1, 11:59 am, Fred <[email protected]> wrote: > I am using BeforeFind in my Model to filter based on criteria for a > logged in user. This works great and I love how easy this is to do... > However, I am running into a problem. There are certain times that I > don't want to add the filter. For example I have a tree of company's > that a user is in and when I get the children of an element in the > tree I want everything not to have the beforeFind filter things. So > how do I determine what is calling beforeFind? If I could find out > what is calling beforeFind it would make it easy and queryData doesn't > contain anything. I think this is probably something easy that I just > cannot find in the manual. I have hacked it by saying something like: > if ($queryData['order'][0] == 'Company.lft asc') { > return $queryData; > } > This works, but it is 1) really ugly and 2) really poor coding ... how > do I do this correctly? > > Thanks. > Fred --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
