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

MergePair afterMerge overrides hibernate cached version when using a repository find method #54

Open
botenbreuk opened this issue May 25, 2023 · 0 comments

Comments

@botenbreuk
Copy link

WHen using MergedForm in the controller it returns the before and after merge objects. If a find repo call is made with the entity in it that is also used in the MergePair class before the save is done the result will already be updated instead of the one from the database.

In MergePair.merge() if the target uses the findAndDetach() instead of find() this problem wont occur and the repo find will retrieve the correct data from the database and not the altered hibernate cached version.

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

No branches or pull requests

1 participant