I have table messages with two foreign key: user_id_from and user_id_to.
I need to retrieve both rows from table users with “has one” relation.
How can I do that?
I have table messages with two foreign key: user_id_from and user_id_to . I need
Share
I just noticed this is actually a belongs to relationship. So the code should be as follows…
The user_from and user_to can be changed to however you want to access them.
i.e.
and