You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So I am guessing you have a User_model and a Owner_model. In the User_model you have to define the belongs_to=array('owner'), which then automatically looks for an Owner_model and owner_id. Could it be that you actually define the belongs_to in the Owner_model?
I'm trying to use the built in Relationship features, and it's not letting me use my own name when doing a join.
E.G
public $belongs_to = array('owner' => array('model' => 'user_model', 'primary_key' => 'owner_id'));
This won't work. I get an error saying:
"Unable to locate the model you have specified: user_model"
Even though I have specifically set the model to "user_model"?
If I change the word "owner" to "user" (and also change it in the "with()" command) it works.
The text was updated successfully, but these errors were encountered: