I have 2 models: Home and User. A user can has many homes, and a home can have many users.
The table homes_users (the relation table) has these fields: User_id, home_id, date
I need to create a relation between the X user and the Y home, created in Z date (just a date) The code i'm using is:
$user = ORM::factory('User',$user_id);
$user->home_id = $home_id;
$user->date = date("Y-m-d");
$user->save();
But the system says "The property home_id doesn't exists in User_model"
I can add a home to a user, but i cant add a home to a user CREATED IN Z DATE.
How can i do that????