Open fabrii opened 1 week ago
/cc @gsmet (hibernate-orm), @yrodiere (hibernate-orm)
Thanks for reporting.
I tried this locally, and (after a few fixes) managed to get the same error, but upgrading to ORM 6.6.2 seems to resolve the issue: https://github.com/yrodiere/quarkus-playground/tree/FetchNotFoundException-fixes
I'll close this as a duplicate of #7462, which should get resolved by #44391.
Actually you know what, the cause is similar (some issue in the merge code) but may not be the same, since the thrown exception is not the same either... I'll just leave this open and mark it as fixed by #44391.
Describe the bug
After upgrading to Quarkus >= 3.14.0, some save operations started to fail with the following error:
Check also this comment https://github.com/quarkusio/quarkus/issues/42902#issuecomment-2333469262
The error is also happening with
quarkus.hibernate-orm.flush.mode=always
This seems to be related to the Hibernate 6.6 update.
Expected behavior
Save correctly, as previous Quarkus versions. It is working in <= 3.13.3
Actual behavior
No response
How to Reproduce?
https://github.com/fabrii/quarkus-playground/tree/FetchNotFoundException
It has something to do with detached entities, and optional = false annotation.
For example,
In Module class,
if the
optional=false
tag is removed, the test works.This reproducer works correctly on Quarkus <= 3.13.3
Output of
uname -a
orver
No response
Output of
java -version
openjdk version "21.0.2"
Quarkus version or git rev
Build tool (ie. output of
mvnw --version
orgradlew --version
)No response
Additional information
No response