Open darkpastiurs opened 7 months ago
/cc @DavideD (hibernate-reactive), @FroMage (panache), @gavinking (hibernate-reactive), @loicmathieu (panache)
Thanks for the test project.
I suspect this is a bug in Hibernate Reactive, I need to create a specific test for it. I will create an issue
Describe the bug
When attempting to perform the
persist()
action with an entity that has one-to-one relationships with another entity, it returns the errororg.hibernate.PropertyAccessException: Could not set value of type [org.hibernate.action.internal.DelayedPostInsertIdentifier]
when trying to persist the entity that is considered the parent. For the project (of which I attach the repository link), the parent entity can be considered thePersona
class and the child entitiesPersonaNatural
andPersonaJuridica
, which maintain a one-to-one relationship, and when trying to persistPersona
with either of the child entities, it returns the error described above. It should be noted that thePersona
entity is inserted normally, the problem occurs when it is going to persist any of the child entities.Expected behavior
Persist the parent entity automatically (in cascade) and without additional code, store either one of the child entities.
Actual behavior
The transaction to store the information sent through the REST endpoint is not completed, therefore nothing is stored in the database.
Log:
How to Reproduce?
GitHub Repo: personeria
Output of
uname -a
orver
Linux asus-laptop 5.14.21-150500.55.52-default #1 SMP PREEMPT_DYNAMIC Tue Mar 5 16:53:41 UTC 2024 (a62851f) x86_64 x86_64 x86_64 GNU/Linux
Output of
java -version
java version "21.0.3" 2024-04-16 LTS Java(TM) SE Runtime Environment Oracle GraalVM 21.0.3+7.1 (build 21.0.3+7-LTS-jvmci-23.1-b37) Java HotSpot(TM) 64-Bit Server VM Oracle GraalVM 21.0.3+7.1 (build 21.0.3+7-LTS-jvmci-23.1-b37, mixed mode, sharing)
Quarkus version or git rev
3.9.5
Build tool (ie. output of
mvnw --version
orgradlew --version
)Apache Maven 3.9.6 (bc0240f3c744dd6b6ec2920b3cd08dcc295161ae) Maven home: /home/darkpastiurs/.m2/wrapper/dists/apache-maven-3.9.6-bin/3311e1d4/apache-maven-3.9.6 Java version: 21.0.3, vendor: Oracle Corporation, runtime: /opt/graalvm Default locale: es_ES, platform encoding: UTF-8 OS name: "linux", version: "5.14.21-150500.55.52-default", arch: "amd64", family: "unix"
Additional information
For additional information: I add that I have used the Hibernate ORM 6 test template in the hibernate-test-case-templates (QuarkusLikeORMUnitTestCase) repository to check if there was any problem with the entity mapping or something was out of place in the way I am doing it and there seems to be no problem, everything runs properly. I attach a link to the copy I made of said repository with the entities configured in the same way as in the project that I have shared earlier: hibernate-orm-test