Use $this->id and it will be either the record that was updated or the record just added.
Cheers, Adam On Apr 17, 11:41 am, Joshua McFarren <[EMAIL PROTECTED]> wrote: > Hi Chris, > > Thanks for responding. The if(! $created) condition is definitely > being met, I tested it when trying to debug. Still stumped. > > Also, sorry I forgot to mention in my original message which version > of cakephp I'm running. I tested this Model with cake_1.2.0.6311-beta > and the most recent nightly build (cake_1.2.x.x_16.04.2008). > > FYI, from the API: > > Model::afterSave( $created ) > After save callback > Parameters: > boolean $created True if this save created a new record public > Definition at line 2494 of file model.php. > Referenced by save(). > > Best, > Joshua > > > Perhaps I'm just jetlagged, but your if statement seems to only be > > triggered if the record has NOT been saved, which is kind of weird. > > Maybe I'm misunderstanding what's happening here. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
