If you are using CakePHP 1.2 (as you stated) then do not pass $data to the save model, instead first construct the model with your data and then call save:
$this->Classad->create($this->data); $this->Classad->save(); As of CakePHP 1.2 save() no longer expects the data. Use create() to specify it. -MI --------------------------------------------------------------------------- Remember, smart coders answer ten questions for every question they ask. So be smart, be cool, and share your knowledge. BAKE ON! blog: http://www.MarianoIglesias.com.ar -----Mensaje original----- De: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre de Ámon Tamás Enviado el: Martes, 13 de Febrero de 2007 06:04 a.m. Para: Cake PHP Asunto: beforeSave problem (1.2) I have a beforeSave() in my Classadd model. In here I adding some extra value for the database row, somethind like this: $this->data['Classadd']['emailazon'] = $this->RandString(24); but, when I try to get back this data after the $this->Classadd->save($this->data) In the $this->Classadd->data is empty. (The insertion is good.) That was working in the last stable version. Is this a bug or a new feature? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---