I would probably split it into two calls assuming this code is in your Model1 model:
$this->saveAll($data['Model1'], array('fieldList' => array('date'))); $this->Model2->saveAll($data['Model2'], array('fieldList' => array('date'))); On Fri, Nov 13, 2009 at 8:52 AM, mattalexx <mattal...@gmail.com> wrote: > Any luck figuring this one out? > > On Nov 5, 3:15 am, Raph <ra...@epoczta.pl> wrote: > > Hello, > > > > Let's say I have a model Model1 with fields 'name' and 'date' and I > > have a Model2 with field 'name'. Model1 is in relation 'hasMany' with > > Model2. How should I use saveAll() method with "fieldList" parameter > > if I only want to save all 'date' from Model1 and 'name' from Model2? > > It looks like in "fieldList" array only fields' names without models' > > names allowed i.e. > > > > This will work: > > $this->saveAll($data, array('fieldList' => array('date'))); > > > > but this won't: > > $this->saveAll($data, array('fieldList' => array('date', > > 'Model2.0.name'))); > > > > this won't either: > > $this->saveAll($data, array('fieldList' => array('date', > > 'Model2.name'))); > > > > Any suggestions? > > > > -- > > Raph > > -- > > You received this message because you are subscribed to the Google Groups > "CakePHP" group. > To post to this group, send email to cake-...@googlegroups.com. > To unsubscribe from this group, send email to > cake-php+unsubscr...@googlegroups.com<cake-php%2bunsubscr...@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/cake-php?hl=. > > > -- You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-...@googlegroups.com. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/cake-php?hl=.