-->
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: How to model object containing an object?
PostPosted: Wed Nov 24, 2004 5:41 am 
Beginner
Beginner

Joined: Thu Sep 02, 2004 9:17 am
Posts: 21
Hi

I have some objects "A" which can contain "B" objects. Each "B" object can be contained by 0 to many "A" objects.

So I have a Collection of B's in my A object, and a link table for associating B's with A's.

At times, given a "B" object I need to find all the "A" objects which contain it. How do I do that? Do I need to go for bi-directional many-to-many mapping (I don't really want B to need knowledge of the A's which contain it)?



Hibernate version:
2.1.6


Thanks for any help.
Peter


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.