-
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
Memory connector should enforce referential integrity #2333
Comments
The pull request loopbackio/loopback-datasource-juggler#1672 contains an early version of UNIQUE index support for our memory connector. |
@strongloop/loopback-next Let's add the acceptance criteria for this story. |
I think we need to work on #2606 first and the implement any follow-up stories. |
This issue has been marked stale because it has not seen activity within six months. If you believe this to be in error, please contact one of the code owners, listed in the |
This issue has been closed due to continued inactivity. Thank you for your understanding. If you believe this to be in error, please contact one of the code owners, listed in the |
The memory connector should enforce foreign key and uniqueness constraints for HasMany, HasOne and BelongsTo relations.
For example, when creating an order using
/post/{userId}/orders
for auserId
which is not that of a user, I would've expected some sort of a check that would've ensure that theuserId
exists. The connector should throw an error for anuserId
not in the database.See #1718 for background and #2332 for the SQL story.
See https://github.com/strongloop/loopback-connector-rest/issues/134 for a
Connector
helper to parse different styles of index/fk definitions into a format that's easy to consume by connectors.Acceptance criteria
memory
connector to enforce unique indexes defined at model and property level, leverage the new helper implemented by https://github.com/strongloop/loopback-connector-rest/issues/134. See Sugarresponse
decorators for easier controller config #1672 for the description of different ways on how model indexes can be defined. See feat: add unique index support on create for in-memory connector loopback-datasource-juggler#1672 for prior implementation that was not finished.memory
connector to enforce FOREIGN KEY constraints defined at model and property level, leverage the new helper implemented by https://github.com/strongloop/loopback-connector-rest/issues/134. See Sugarresponse
decorators for easier controller config #1672 for the description of different ways on how model indexes can be defined.memory
connector (see out-of-scope below).Out of scope
onUpdate
andonDelete
options for foreign keysThe text was updated successfully, but these errors were encountered: