-->
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: Collection Mapping question
PostPosted: Thu Sep 15, 2005 4:59 am 
Newbie

Joined: Wed Apr 13, 2005 8:10 am
Posts: 15
Hi -
I have two entities:
Product (id: int)
and
ProductName (composite-id: fkProduct, language).

What would be the best way to collection-map both:

I thought about a map in which the language is used as the key, so I can do:

ProductName pname = (ProductName)product.getNames().get(language);

but if I use <map>, I have to define a key which is corresponding to the whole PK of the ProductName.

How do I map this?

Cheers,
Ron


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.