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.  [ 2 posts ] 
Author Message
 Post subject: Problem in saving object hierarchy
PostPosted: Fri Aug 28, 2009 1:20 am 
Newbie

Joined: Thu Dec 18, 2008 6:14 am
Posts: 3
Hi All,

I am getting errors when I try to save an object having its child relations..
For e.g. I have 3 classes
A is a parent of B, and B is a parent of C
When I try to save object A using session.save(A), I got the following error: "Could not delete collection: Persistance.A.B"
I have not specified any cascade condition against bag of class B, in mapping file of class A
I need to save all the objects (remember, not update - as these objects are newly created)


When I set cascade="all-delete-orphan", exception says: "Don't dereference a collection with cascade=all-delete-orphan": Persistance.A.B


Any help will be welcomed..

Thans,
Ovais


Top
 Profile  
 
 Post subject: Re: Problem in saving object hierarchy
PostPosted: Fri Aug 28, 2009 5:35 am 
Expert
Expert

Joined: Thu Dec 14, 2006 5:57 am
Posts: 1185
Location: Zurich, Switzerland
Can you post the mappings ?

_________________
--Wolfgang


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

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.