Yeah, this is essentially what I had to end up doing.  I wanted to
save a bunch of records at once and it worked great until I added the
hasOne/hasMany relationship.   So I had to stop saving them all at
once and do one at a time.  But at least it saves the associated data
at the same time as it does the main data.

I wish that I could figure out a way to save ALL the data at once,
rather than one row (and associated rows) at a time.  It just seems
like the way I ended up doing it is rather cheesy.

On Aug 21, 2:22 am, Luke <eike...@gmail.com> wrote:
> Hi Nancy,
>
> I had the same issue like you are describing, how to save the
> hasMany.... after positing it on here, I found the solution.
>
> I have a recipe hasMany Ingredient relationship, the importance is to
> have the array formated in the right way. It needs to look like below,
> than it will work.
>
>  [Recipe] => Array
>         (
>             [recipe_name] => Champions
>             [Rezeptportion] => 2
>         )
>
> [Ingredient] => Array
>         (
>             [0] => Array
>                 (
>                     [ingredientname] => Champions
>                 )
>
>             [1] => Array
>                 (
>                     [ingredientname] => pepper
>                 )
>
> Try this out and let me know if you struggle, maybe we find an answer.
>
> Luke
--~--~---------~--~----~------------~-------~--~----~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to