Hi All, after having posted here
http://forum.hibernate.org/viewtopic.php?t=935415 & waited a long time to see if any one can answer it, but with no final answer, I can only assume that there is a problem with
cascade="all-delete-orphan" when re-attaching detached objects. If anyone is experiencing a similar problem please see the post referenced above. I can make the failing unit test work by explicitly deleting the child after saving the parent
Code:
saveObject(parent2);
// have to explicitly delete child here if this is to work - CAN NOT rely on delete-orphan working!
deleteObject(child);
I am however still really curious, have I misunderstood the documentation & HIA here, or is this a bug? (Despite this both Hibernate & HIA are excellent- thanks guys!!).
Many Thanks
Paul