In the afterDelete() callback, $this->id (or $model->id) in a behavior
will refer to the just-deleted model. It's cleared after the callbacks
have been called, just before Model::del() returns.

hth
grigri

On Apr 9, 4:09 pm, park <[email protected]> wrote:
> Hi,
>
> Working on a set of models, in which after one model got its record
> updated, the Log model will be manipulated accordingly.
>
> $cascade = true of Model:del() doesn't seem to work, 'coz models
> mentioned above are not associated. (Log model has a field 'item_id'
> that is shared by all other models, recording their ids but
> diffrentiated by another field 'model'. )
>
> Is it possible to get the last deleted record id from whatever
> beforeDelete or afterDelete callbacks?
>
> If not, I guess I'll have to extend Model::del in order to get this,
> right? Is there a DRY approach of doing this? (Like writing a
> behavior)
>
> Many thanks!
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to