Hibernate 4.2.14.SP1 cascading problem
Issue
- While migrating from jboss 4 to jboss 6 manage some test to verify compatibily.
- One of this test using a Spring Context create an Hibernate Session and with groovy manages some entity bean ,doing queries and saving data in db.
-
With Hibernate 3 plus envers there were no problem. With Hibernate 4 plus the built in envers we have a cascade save which causes performance problem.
-
There are three entities :
1 . Appointment
2 . Patient
3 . PatientEncounter
Appointment has a one-to-many relation to Patient. PAtient has a one-to-many relation to PatienEncounter.
- Usually create a new Appointment, then link the Patient and persist the Appointment. With Hibernate 4 it seeems the cascade works properly from appointment to the Patient, but the it starts iterating on Patient PatientEncounter List (which can be many)
Environment
- Red Hat JBoss Enterprise Application Platform (EAP)
- 6.3.0
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
