Joined: Mon Dec 19, 2005 3:31 pm Posts: 3 Location: Darmstadt, Germany
|
I have a parent-child relation with cascade="all-delete-orphan" and I want to insert a new database row (for both the parent and all its children), every time the parent is made persistent.
I tried to solve the problem by using session.merge(). This seems to work well, but one of my properties in the parent is a custom user type and everytime I use merge this attribute remains null.
Another approach was to set the ids manually to null but this didn't work either.
What is the best way to achieve my goal? I don't want to use clone for my objects (because a lot of new problems arise).
|
|