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

Wrap saving operations in a transaction #42

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

ykiu
Copy link
Contributor

@ykiu ykiu commented Nov 14, 2017

The current implementation seems to break the closure tree when we try to save an instance with dirty parent value (i.e. referencing self or child). This causes db constraint failure, so I suggest we wrap the saving operation in a transaction to detect and reject dirty data.

ykiu added 3 commits November 14, 2017 19:57
Wrap saving operations in a transaction to prevent inconsistency between main model and closure model
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.

1 participant