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
Given a standard one-to-many relationship Posts and Comments, where comments table has a post_id without a foreign-key constraint, the usage of combine will map every relationship to the primary node.
To Reproduce
Provide detailed steps to reproduce, an executable script would be best.
rom.relations[:posts].combine(:comments)
Expected behavior
Unsure, but warnings/documentation could help.
Perhaps, warn/error when missing fk?
Require "virtual_foreign_key"?
Your environment
Affects my production application: NO
Ruby version: 2.6.x, rails 5.2
OS: Catalina
The text was updated successfully, but these errors were encountered:
Describe the bug
Given a standard one-to-many relationship
Posts
andComments
, wherecomments
table has apost_id
without a foreign-key constraint, the usage ofcombine
will map every relationship to the primary node.To Reproduce
Provide detailed steps to reproduce, an executable script would be best.
Expected behavior
Unsure, but warnings/documentation could help.
Your environment
The text was updated successfully, but these errors were encountered: