-->
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: one-to-one & cascade="all-delete-orphan" (once
PostPosted: Mon Nov 22, 2004 8:42 am 
Newbie

Joined: Mon Nov 22, 2004 5:56 am
Posts: 2
Welcome,

All I need is all-delete-orphan semantics for one-to-one relationship.

I was looking for such a problem on this forum and I found 4 topics:
http://forum.hibernate.org/viewtopic.php?t=931506
http://forum.hibernate.org/viewtopic.php?t=925082
http://forum.hibernate.org/viewtopic.php?t=936167
http://forum.hibernate.org/viewtopic.php?t=933900


But no one of them brings me closer, to how to solve it in an elegant way.

In one of them is proposal of some work-around:
Quote:
As a work around use a bag/list/set/... on the one side and use cascade="all-delete-orphan"
If you prefer hide the fact of the collectino/array behind accessor methods which set/get only one instance into the collection/array.


But in some post Gavin wrote:
Quote:
Actually, I suppose that orphan-delete for one-to-one could be implemented.



Honestly I prefer the second solution, but as far as I know it is unavaible. Is there any chance it would be? (should I open some JIRA issue?)

Maybe there is another more elegant solution then work-around with bag/list/set/... ?


Any help would be apprieciated.

Greetings,
Mikolaj Kmita


Hibernate version: 2.1.6


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.