sorry I did not replied sooner, but I thought I'd get an email
notification...
I'll give this a try, but IMHO this is kind of bad move since a $this-
>User->find() will draw an array similar to the one I posted.
This leads to have a specific form that will match the find syntax.
And I would expect that save would do the reverse as find with the
same dataset.
Anyway I'll test this saveAll method and let the group know of the
results.
Thanks for your help !
Jérôme
On 27 fév, 15:17, Matt Curry <m...@mcurry.net> wrote:
> Here's the recently committed unit test for saving HABTM w/ extra
> fields. If you follow this format, it's pretty safe to assume it'll
> work in the futurehttps://trac.cakephp.org/changeset/8049
>
> -Matthttp://www.pseudocoder.com
>
> On Feb 27, 6:29 am, Jne <goo...@neuveglise.net> wrote:
>
>
>
> > 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:
Post a Comment