Force transitive persistence order in JPA 2 w/Hibernate?

Looking at your description, I think that the Persistence system tries to persist first in this order.

Looking at your description, I think that the Persistence system tries to persist first in this order: First the Parent. Childreni Each Childreni has a transient pointer to Desk. The system fails to persist it because you have not configured it as Cascade.Persist.

Then it fails when persisting Desk, and you think that it fails in the path Parent. Desksi (which is configured as Cascade) but maybe the fail doesn't come from this path.

Adding CascadeType. PERSIST to Child. Desk does achieve the desired behavior.

I'm not necessarily keen on that option, but it's better than littering my code with em.flush(). – BobG Sep 9 at 21:49.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions