-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@belongsTo doesn't create relations in database #4921
Comments
LoopBack 4 does not create database constraints at the moment: #2331 I'll close this so that we can consolidate discussion to the epic. Feel free to comment if I misunderstood the issue. |
Duplicate of #2331 |
@achrinza I mean references in sql FK |
Apologies for the confusion; I believe we’re talking about the same thing, just different wording. database constraints = foreign key constraints |
this works for me
|
Apologies, didn’t know your requirement was PostgreSQL/MySQL Glad you’ve found a solution. Unfortunately this isn’t universal across other connectors as LoopBack doesn’t provide a common interface. For example, the MSSQL connector doesn’t support this natively. |
I use mysql |
User Model:
User Device Model:
The text was updated successfully, but these errors were encountered: