If you know both models id's you should be saving directly into the join table.
$data['JoinTableModel']['label_id'] = 1; $data['JoinTableModel']['item_id'] = 2; $this->SomeModel->JoinTableModel->save($data); (the join table model is auto created for you, read up in the manual) On Nov 20, 2:53 pm, RyOnLife <[EMAIL PROTECTED]> wrote: > Array is fine. I think it might be a model problem. > > On Nov 20, 4:30 am, ravindranathbe <[EMAIL PROTECTED]> wrote: > > > With respect to the array u have mentioned above, > > I think u have made some mistake in forming the Form elements. > > Have a check over it. > > > Thanks, > > Ravindranath > > > On Nov 20, 8:57 am, RyOnLife <[EMAIL PROTECTED]> wrote: > > > > I am trying to save some data to a HABTM association. I'm running in > > > debug mode and Model::save() is not even attempting an INSERT. Looking > > > at the query log at the bottom of the page, there is nothing both > > > DESCRIBE and SELECT statements. > > > > Here is the attempted save: > > > > $this->Item->save($label_data); > > > > Where pr($label_data) is: > > > > Array > > > ( > > > [Label] => Array > > > ( > > > [Label] => Array > > > ( > > > [0] => 2 > > > [1] => 5 > > > [2] => 3 > > > ) > > > > ) > > > > [Item] => Array > > > ( > > > [id] => 223 > > > ) > > > > ) > > > > I feel like I must be missing something obvious. I did try a $this- > > > > >Item->create() ahead of the save(), but it made no difference. > > > > Anyone have any insight for me? Thanks! > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
