-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: cascade="delete-orphan" causes TransientObjectExce
PostPosted: Fri Aug 11, 2006 7:48 am 
Newbie

Joined: Mon Aug 08, 2005 11:19 am
Posts: 5
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.