-->
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: Entity associations using <map>
PostPosted: Thu Jan 05, 2006 10:58 am 
Beginner
Beginner

Joined: Fri Dec 23, 2005 6:05 am
Posts: 42
Hello,

I am trying to map two Hashtables using a unidirectional <map>.
For valuetype mapping i would use something like this:

Quote:
...
<class name="Demo.Parent, Demo" table="parent">
<id name="Id" column="demoId" type="Int32">
<generator class="native" />
</id>
<map name="childOne" lazy="true" table="childs">
<key column="childOneID" />
<index column="childOneKEY" type="String" />
<element type="String" column ="childOneVALUE" not-null ="false" />
</map>
<map name="childTwo" lazy="true" table="childs">
<key column="childTwoID" />
<index column="childTwoKEY" type="String" />
<element type="String" column ="childTwoVALUE" not-null ="false" />
</map>
</class>
...


But what must I do if I want to use objetcs as KEYs or/and VALUEs?

thx

eg


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 05, 2006 1:57 pm 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
Please read http://www.hibernate.org/hib_docs/v3/re ... ns-indexed - check map-key-many-to-many and many-to-many


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.