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
@hacksparrow thanks for opening the issue 👍 I think this is because of the design. I remember @Janny had the same question before, and we discussed it in #5719 (review) (quote from @bajtos ):
So far, LoopBack implements what we call "weak relations", where it's up to the database to enforce any referential integrity. Typically, when using SQL, there is a foreign key constraint configured to ensure the "link" rows cannot point to a source/target model that does not exist, and also that it's not possible to delete a source or a target row before all their "link" rows are removed first. (It's also possible to configure cascading delete, but let's not get distracted.) We have been discussing "strong relations" in the past, but they weren't a priority so far. You can learn more in #2331.
IMO, we should keep the current ("weak") design, if only for consistency with other existing relational APIs, and mention in the documentation that the referential integrity must be configured at database level.
This appointment is getting created despite the source and target model ids not existing.
The text was updated successfully, but these errors were encountered: