-->
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: mapping a dictionary with composite key problem
PostPosted: Mon Aug 06, 2007 2:33 am 
Newbie

Joined: Mon Aug 06, 2007 2:21 am
Posts: 2
So i want to map a dictionary of the type IDictionary<CLASS, int> in my class called Parent

No fuz so i start on it and get to this:

<map
name="Class"
table="test_class"
cascade="all-delete-orphan" >
<key column="ParentId" />
<index-many-to-many class="assembly.CLASS, assembly" />
<element type="Int32" column="Amount" />
</map>

up to here no problem, but
now my CLASS uses a composite key, and thats where the trouble comes in,
i can't manage to map that.

the class uses a composite id, that has been put in the class CLASSIdentifier and it consists out of a strings and an int, call it name and version.

Any1 know how to deal with that? i tried it using composite-index but it doesnt seem to work that way

Now i know some people will say dont use composite keys, and i must say i agree, but its out of my hands, that class has been developed by another programmer.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 10, 2007 4:04 am 
Newbie

Joined: Mon Aug 06, 2007 2:21 am
Posts: 2
I guess its not as simple ehh,

any1 know if what i want to do is even possible?


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.