-
Notifications
You must be signed in to change notification settings - Fork 217
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
Add capability to modify the linking table even if it is not exposed to satisfy foreign key constraints #285
Comments
Consider three tables: When a delete mutation is executed on either
IMHO, the current behavior that we observe at the moment is what we would want, as it honors the way the tables (and relationships) are setup. @Aniruddh25 @yorek |
CASCADE deletes is a good find, we need to document this. |
|
@severussundar @ayush3797 is this needed for Nested mutations? |
I don't think this is needed. The user can setup CASCADE DELETE or use an AFTER DELETE trigger to ensure consistency of the linking table. In future, we might consider an option to somehow enable them to specify if they want to peform the deletions in the linking table as well, in which case we can figure out some logic to maintain consistency. However, this for sure should not be an immediate concern. |
As outlined in the previous comments, when To support the same via a GraphQL operation through DAB without requiring users to setup triggers or cascade operations,
|
Current requirement is entities must be in config to be modified. The requirement for table mod is met this way, even if the case of this issue is not. For now, we will keep mod ops limited to entities actually in the config file. |
In M:N relationships when the linking table is not exposed, we need to make sure mutation on the parent tables trigger deletion of rows in the linking table as well.
E.g. book_author_link should have its row deleted when a book with book_id referenced in that row is deleted from the books table.
The text was updated successfully, but these errors were encountered: