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

entityManager.flush() provides transaction COMMIT, while it shouldn't. Rollback doesn't happen. #2059

Open
DmitryTen opened this issue Feb 7, 2024 · 0 comments

Comments

@DmitryTen
Copy link

In our project the entityManager.flush() request leads to Transaction COMMIT, therefore data is not rolled back in case of RuntimeExceptions thrown within @transactional .
As i understand this is not correct behaviour, but tell me if i'm wrong.

To reproduce the bug i've prepared a test project: https://github.com/DmitryTen/eclipse-link-bug
It runs with H2 DB, and should run out of the box.

You need to go to EclipseLinkTest test class, and run the buggyBehaviourTest().

Not sure what to add else, if you have question to specify, feel free to ask.

Dmitriy

@DmitryTen DmitryTen changed the title entityManager.flush() provides transaction COMMIT. entityManager.flush() provides transaction COMMIT, while it shouldn't. Rollback doesn't happen. Feb 9, 2024
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