Friday, February 27, 2009

Saving extra fields in HABTM changed in RC4/1.2/1.2.1 ?

Hi,

I have a slight problem on saving HABTM data with extra fields.
I used to insert data this way (Users HABTM Companies with extra
fields like description, start_date, end_date, ...

This is working OK with RC3 with a $this->User->save($this->data);

$this->data is :
Array
(
[User] => Array
(
[id] => 1
)

[Company] => Array
(
[0] => Array
(
[UsersCompany] => Array
(
[is_school] => 1
[description] => hjlhsf

[start_date] =>
[end_date] =>
[current] => 0
[company_id] => 82
[user_id] => 1
)

[name] => shljhcljh
[id] => 82
)

)

)

What sould be the correct format for Cake 1.2.1 so I do not have to
change the code in the future ?

Many thanks !!

Jérôme

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

No comments: