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
The adapter should at least verify that the type key in the linkage matches the type for the root model of the model that the relationship points to. That is, if the relationship is specified as holding a school, the adapter should at least verify that the linkage type is "organizations". If you want to work up a failing test for that, it would be much appreciated.
Arguably, the adapter should go further and verify that there actually is a document that exists with that id and that its discriminator key indicates that it is really a school, but I think that check is lower priority/I go back and forth on whether it's worth the overhead. (That check for the actual existence of a document with the related id didn't happen before subtypes were introduced either, and would require another query for each relationship in mongo land. Checking the existence of the related resource is easier in SQL land, I imagine, as the foreign key constraint should just fail.)
This issue is just a reminder to self.
The text was updated successfully, but these errors were encountered:
Quoting from #149 (comment)
This issue is just a reminder to self.
The text was updated successfully, but these errors were encountered: