I have two models called entity and user.
The entities table has a column called users_id that contains the user
id of the user that created the entity.
In entity I have…
… as I want to be able to show the user who created the entity from
the entity object.
But this produces the following error…
Mysql::Error: #42S22Unknown column ‘users.entity_id’ in ‘where clause’:
SELECT * FROM users WHERE (users.entity_id = 1) LIMIT 1
…Where I want it to select users by users.id.
What do I do? I bet it is easy.