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
A call to Report.where('id', 1).user() will only return the first one (the reported user) and not the second one.
And using hasMany doesn't work, since we have two oneToMany relationships.
The text was updated successfully, but these errors were encountered:
When trying to create two foreign keys to the same model, using the function
hasOne
can only retrieve the first of the two referenced objects.Say for example you have a
User
, and the possibility to report a user withReport
like so:A call to
Report.where('id', 1).user()
will only return the first one (the reported user) and not the second one.And using
hasMany
doesn't work, since we have twooneToMany
relationships.The text was updated successfully, but these errors were encountered: