-->
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: query on a map's key(map-key-many-to-many)
PostPosted: Mon Oct 31, 2005 1:58 am 
Newbie

Joined: Mon Oct 31, 2005 1:47 am
Posts: 1
Hi All, I have domain objects A, B and C. The relations between objects
is as follows...

A contains a map with B as key and C as the value.

Here's the hibernate mapping (just the map) that associates these
objects..

<hibernate-mapping>
<class name="A" table="A">
<id name="id" column="ID">
<generator class="sequence"/>
</id>
<map name="bc" table="BC">
<key column="ID"/>
<map-key-many-to-many column="b" class="B"/>
<one-to-many class="C"/>
</map>
</class>
</hibernate-mapping>

Here is what I want my query to do...
Given an object B, I would like to get a list of object A's that has object B as a key in the map. Any ideas/sample code would be greatly apreciated.

Thanks,
rr


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.