Hibernate - merge deletes parent when using @Cascade.

Solution Verified - Updated -

Issue

I have experienced some strange behaviour in hibernate I need your support with.
In general the setup looks like this:

one Formular has several Vermittler and several PersonManuell which both are cascade all-delete-orphans.

if a Personmanuell is removed from Formular and Formular is Merged, the PersonManuell entry gets deleted and everything is just fine.

if a Vermittler is removed from Formular which is then merged with the DB, the whole Formular is deleted as well which definitively is not what we wanted. Only the removed child should be deleted. also it does not matter if Formular has any other children, as soon as a Vermittler is deleted, the entire Formular gets deleted.

Hibernate-Version: 3.2.4.sp1.cp11

Environment

JBoss Enterprise Portal Platform (EPP) 4.3.0.GA_CP06

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.