Skip to content
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

Fixed onDeleteModel "Missing Id" and "ForeignKey constraint" errors #104

Merged
merged 5 commits into from
Aug 7, 2023

Conversation

DeividasDavidav
Copy link
Contributor

@DeividasDavidav DeividasDavidav commented Aug 2, 2023

"Missing Id: error deleting model" error:
Added a fix and test for "Missing Id: error deleting model" which occured because onDeleteModel deleted definition model. It shouldn't delete definition model in onDeleteModel if its partition element will also be deleted, because elementTreeDeleter deletes definition model while deleting definition partition element.

"ForeignKey Constraint: error deleting model" error:
Added a fix and test for this error. Transformer tries to delete models before it deletes elements. Definition models cannot be deleted unless all of their modeled elements are deleted first.

…nstraint: error deleting model" bugs related with model deletion. Also added tests
Copy link
Contributor

@MichaelBelousov MichaelBelousov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like I never submitted this review... sorry about that. Working on it now since your term ended

packages/transformer/src/IModelTransformer.ts Outdated Show resolved Hide resolved
packages/transformer/src/IModelTransformer.ts Outdated Show resolved Hide resolved
@MichaelBelousov MichaelBelousov enabled auto-merge (squash) August 7, 2023 12:07
@MichaelBelousov MichaelBelousov merged commit 2660dd7 into main Aug 7, 2023
9 of 11 checks passed
@MichaelBelousov MichaelBelousov deleted the DeividasDavidav/ModelDeletionBugs branch August 7, 2023 12:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants