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
@OptimisticLocking(DIRTY)
leads to wrong query during delete of circular reference
#24842
Comments
hi @mickroll - thanks for the report. May I assume I can ask the Hibernate ORM team to have a look, or is there a specific reason to have reported it to Quarkus? |
Now that you are asking, yes this is hibernate-related. Please feel free to forward. |
Hey @Sanne, is there a HHH issue already? |
FYI @Sanne i just reported this as a hibernate issue: https://hibernate.atlassian.net/browse/HHH-15218 |
sorry for the lack of communications. I've pinged the ORM team to make sure it gets triaged, seems to have fallen through the cracks. Not sure if we'll have the bandwith to fix it in 5, but let's see what the team thinks. |
Describe the bug
Having a circular reference between two Entities and deleting one of them with cascading enabled, the final delete query fails, if the "root"-Entity uses
@OptimisticLocking(DIRTY)
.Expected behavior
The following queries are generated and executed:
All query-parameters are filled with non-null, existing values.
Both deletes are successful.
Actual behavior
The following queries are generated and executed:
All query-parameters are filled with non-null, existing values.
The last query is wrong and references old state that was changed in the first query.
This leads to the following error:
How to Reproduce?
see https://github.com/mickroll/quarkus-demonstrator/tree/optimistic-locking-circular-reference-delete
Demonstrator uses Quarkus 2.6.2.Final, but the same Bug also appears on Quarkus 2.8.0.Final.
Output of
uname -a
orver
Windows 10
Output of
java -version
openjdk version "11.0.12"
GraalVM version (if different from Java)
No response
Quarkus version or git rev
2.6.2.Final / 2.8.0.Final
Build tool (ie. output of
mvnw --version
orgradlew --version
)Apache Maven 3.6.3
Additional information
No response
The text was updated successfully, but these errors were encountered: