try the SaveAll method.Are you using the form helper to get your data ? Kole
On Thu, Mar 24, 2011 at 10:19 AM, Jeremy Burns <[email protected]>wrote: > I have a form that contains a habtm input. The array sent into the > Business model on an insert looks a little like this: > [Business] => Array > ( > [address_1] => xxx > [...other fields...] > [Profession] => Array > ( > [0] => 32 > [1] => 19 > [2] => 30 > ) > ) > > Note there is no field for Business.id as it is a new record. > > This command in the Business model: > > $this->save($business) > > ...creates the new Business record, but not the Profession habtm > records. > > $this->save($business['Business']) does the same thing. > > I thought that when I save the containing model the habtm records > would also be inserted? What am I doing wrong? > > -- > Our newest site for the community: CakePHP Video Tutorials > http://tv.cakephp.org > Check out the new CakePHP Questions site http://ask.cakephp.org and help > others with their CakePHP related questions. > > > To unsubscribe from this group, send email to > [email protected] For more options, visit this group > at http://groups.google.com/group/cake-php > -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php
