Hibernate Version: 3.0.5
Mapping documents: Unable to post because of client confidentiality - but will post test case soon
Name and version of the database you are using: SQL Server 2000
Hi,
I've recently changed the cascade on a set property of parent from "none" to "delete-orphan". This had the desired effect of allowing Hibernate to remove child elements from the database when they are removed from the parents collection using session.update(parent)
However it had the undesired effect of creating a TransientObjectException when first creating the parent object using session.save(parent)
Error:
org.hibernate.TransientObjectException: object references an unsaved transient instance - save the transient instance before flushing:
Can anyone explain why changing the cascade from "none" to "delete-orphan" is causing this?
PS I will create a test case and post details of mapping files, stack trace, debug shortly
|