Here's the structure I ended up having to go with
$save['Constoptvalue']['device_id'] = 16;
$save['Constoptvalue']['constopt_id'] = 1;
$save['Constoptvalue']['valid'] = 1;
$save['Compoundchainlist']['name'] = 'poohbear';
$save['Layer'][0]['layer_id']=4;
$save['Layer'][1]['layer_id']=2;
$save['Layer'][2]['layer_id']=3;
So I can only save one 'Constoptvalue' with it's related data at once,
rather than everything that was modified (multiple rows). *sad face*
On Aug 21, 2:22 am, Luke <[email protected]> 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 [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
-~----------~----~----~----~------~----~------~--~---