-->
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: nested list mappings
PostPosted: Tue Sep 08, 2009 9:25 am 
Newbie

Joined: Tue Sep 01, 2009 3:22 am
Posts: 5
Hi,

i have the following classes: MyClass, YourClass and HisClass

MyClass contains a List of YourClass
and
YourClass contains a List of HisClass

so I have a class that contains a List of Objects, each of which contains a List of more Objects...

so I map:

<hibernate-mapping>
<class name="MyClass" table="myclass">
...
<property name="someproperty" />
...
<list name="yourclass" table="myclass_yourclasses">
<key column="myclass_id" />
<list-index column="position" />
<composite-element class="YourClass">
...
<property name="someproperty" />
...
<list name="hisclass" table="myclass_yourclasses_hisclasses">
<key column="yourclass_id" />
<list-index column="position" />
<composite-element class="HisClass">
...
</composite-element>
</list>
</composite-element>
</list>
</class>
</hibernate-mapping>

but Hibernate would let me do this mapping.
How would I do that?

Thanx for some hints.
Cheers
Björn


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.