Array
(
[User] => Array
(
[id] => 1
)
[Company] => Array
(
[0] => Array
(
[company_id] => 68
[is_school] => 0
[start_date] => 2000-08-15
[end_date] => 0000-00-00
[description] => Founder and webmaster
[current] => 1
)
[1] => Array
(
[company_id] => 5
[is_school] => 1
[start_date] => 1994-09-01
[end_date] => 1997-06-30
[description] => Network & Telecom Engineer
[current] => 0
)
[2] => Array
(
[company_id] => 37
[is_school] => 0
[start_date] => 1998-04-01
[end_date] => 2005-07-13
[description] => Network Engineer and Project
Manager
[current] => 0
)
)
)
IMHO it just adds array manipulations in the controller. I wish the
save() could do as it used to.
Shall I file a CR ?
Thanks,
Jérôme
On 4 mar, 08:23, Jne <goo...@neuveglise.net> wrote:
> Hi Matt,
>
> 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