Uh, I guess I don't really get what you're talking about, since you can't use conditions in Model::del() (unless of course you're thinking of Model::deleteAll(), which is new in 1.2 and still mostly uncharted territory). Maybe posting some code would help clarify what it is that you're trying to do.
On Feb 26, 10:05 pm, Langdon Stevenson <[EMAIL PROTECTED]> wrote: > Hi Nate > > In my design the list of constraints are determined and set by the > controller. beforeDelete() would just be a convenient place to add them > to the query as it could be done globally. > > The change I was suggesting would allow you to add delete conditions in > the controller (as you suggest). It would also save you from having to > have a bunch of php to decide if the record can really be deleted or not > > I am unsure why it is valid to manipulate conditions of a find query at > the model level, but not for a delete query? > > Regards, > Langdon> The primary key value of the model being deleted is available as > $this- > > id in Model::beforeDelete(), however, the proper place for the use > > case you're describing (authorization) is most correctly handled at > > the controller level. --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---
