Bug Report #2733

change how relationships are created

Added by Ben Rogers almost 5 years ago.

Status:NewStart date:03/23/2010
Priority:NormalDue date:
Assignee:-% Done:


Target version:-
Resolution: Points:


best way to explain is through an example

user has_many orders

$order = ORM::factory('user',1)->orders;
$order->amount = 5;
//above example auto inserts user_id and saves order

ORM::factory('user',1)->orders = ORM::factory('order',26);
sets user_id to 1 where order id = 26

Also available in: Atom PDF