I'm not sure that's totally correct as I'm using saveAll quite successfully in another part of the site to create new records in two different models. The Chapter and Path models in fact - the code I'm using for this new feature is based on it.
On Oct 28, 5:15 pm, Miles J <[email protected]> wrote: > If you are saving date for the first time (inserting), you cannot use > saveAll. The foreign keys and relations will not be set. This only > works for updating, and when you do an update the IDs need to be > hidden in the form somewhere. > > You need to do it like > so:http://book.cakephp.org/view/75/Saving-Your-Data#Saving-Related-Model... > > On Oct 28, 10:04 am, Daniel <[email protected]> wrote: > > > I am using saveAll: > > > if ($this->Story->saveAll($this->data, array('validate' => > > 'first'))) // passed validation and successfully saved > > > Unless you mean without the array('validate' => 'first') - in which > > case the validation only works for the Story model. > > > On Oct 28, 4:58 pm, Celso <[email protected]> wrote: > > > > Use saveAll > > > > On 28 out, 13:19, Daniel <[email protected]> wrote: > > > > > Hi guys, I've got a bit of a problem. Rather than type it all out > > > > again here, is it OK if I just link to my blog with all the info: > > > > >http://theworldofdan.co.uk/2009/10/28/problem-saving-data-to-three-mo... > > > > > I would really appreciate it if someone is able to help me out with > > > > this. Thank you --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
