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

Concurrency check for Associated* #151

Open
jods4 opened this issue Oct 23, 2015 · 0 comments
Open

Concurrency check for Associated* #151

jods4 opened this issue Oct 23, 2015 · 0 comments

Comments

@jods4
Copy link

jods4 commented Oct 23, 2015

When mapping Associated* relationships, GraphDiff does not enforce optimistic concurrency.

I think that for many-to-many relationships this is a good default behavior (the other entity is not really modified). I am not sure if the use-cases where you'd need that should be handled with an option or in user code.

For one-to-many on the other hand, checking concurrency should be the default behavior. After all GraphDiff loads the foreign entity from DB and modifies it directly (its concurrency stamp will bump, even if it's not checked).
Consider that two users trying to establish the relationship concurrently would be in a last-write-wins situation (unlike many-to-many).

Adding a concurrency check and making it the default would be a breaking change, so maybe that's not possible. But at least it should be possible to enable concurrency checks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant