On 8 Mag, 13:49, "Dr. Tarique Sani" <[EMAIL PROTECTED]> wrote: > On Thu, May 8, 2008 at 4:50 PM, Jose Selesan <[EMAIL PROTECTED]> wrote: > > Hi all, does anybody know if I can save a model with a hasMany relation > > and each of the related models has a hasMany relation? > > > Hi have a model called Trivia with a 'hasMany' relation to model Pregunta > > and model Pregunta has a 'hasMany' relation to model Opcion. But when I call > > $this->Trivia->saveAll($this->data) in my controller, it only saves Trivia > > and their related Pregunta, but not Opcion > > It should work - try with the latest SVN check out > > If does not work then take a look at the related test - modify it for one > more level and submit as a bug report > > Tarique >
Using saveAll i create a new records in each table related to the one with the primary key linked as hasmany? am i right? But what if i just want to edit a field with a primary key? For example: http://blog.matsimitsu.nl/code/166/saveall-with-cakephp-part2 Let's take that models and relations. If i change the id of a todos record, how can i automatically modify all the records of task linked to id of todos? Is there a way? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
