-->
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: <many-to-many> with itself?
PostPosted: Tue Jun 07, 2005 6:13 pm 
Expert
Expert

Joined: Fri May 13, 2005 5:56 pm
Posts: 308
Location: Santa Barbara, California, USA
so, I think i'm doing something wrong here. any hints are appreciated. I have a GlossaryTerm object with a m=n relationship with itself. the idea is that a GlossaryTerm may be related to n number of other terms. How would I write this in a NHmapping file? I seem to be stick on this:

Code:
<bag name="RelatedTerms" table="GlossaryTermXRef">
   <key column="GlossaryTermID" />
   <many-to-many class="GlossaryTerm" column="RelatedTermID" />      
</bag>


I'm not sure I've modeled this right. If I have, what would the cascades be? and inverse would not really be applicable here? lost...

-devon


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 08, 2005 1:18 pm 
Contributor
Contributor

Joined: Wed May 11, 2005 4:59 pm
Posts: 1766
Location: Prague, Czech Republic
Do you really need cascades in such a situation? You would have to save/update all terms manually anyway, I think. You just have to make sure that when you update A's related terms to include B, you update B's related terms to include A also.


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.