Welcome Guest, Not a member yet? Register   Sign In
Help with datamapper database design and structure
#11

[eluser]North2Alaska[/eluser]
[quote author="Andy78" date="1334317026"]This:

Code:
$user->save(array('order' => $order, 'food' => $food->all);

Doesn't work it flags up the error cannot relate user to food. [/quote]

Try:
Code:
$user->save(array('order' => $order, 'order/food' => $food->all);
That might work.
#12

[eluser]Andy78[/eluser]
That doesn't work either buddy
#13

[eluser]WanWizard[/eluser]
Deep relation saving is not supported, so that is not going to work.
#14

[eluser]Andy78[/eluser]
So is the way I am doing it the most efficient way?
Code:
$order->save($food->all);
        $order->save($takeaway);
        $order->save($user);




Theme © iAndrew 2016 - Forum software by © MyBB