-->
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: How to map a Map's index to something else than PK
PostPosted: Mon Jan 17, 2005 3:37 am 
Beginner
Beginner

Joined: Thu Dec 16, 2004 11:54 am
Posts: 26
Location: Brussels, Belgium
Hi,
I've got probably a simple problem to solve, but I've been rtfm and looking for a solution, but I admit I already have a problem to express my problem in plain english... So here it goes:

I've got 2 tables : countries and countries_i18n that, among others, have these columns:

Country:
- id: PK
- iso: char[2]: [A-Z]{2} UNIQUE

Country_I18N

- id: PK
- iso: char[2]: [A-Z]{2}
- lang: char[2]: [a-z]{2}
- country: varchar

I'd like to achieve following mapping: Country having a Map with as index Country_i18N.lang and element Country_i18n.country so that the JOIN on both tables are on Country.iso <=> Country_i18n.iso and not on Country.id <=> Country_i18n.??? since I don't have it...
How should I do this? change the schema to have that last JOIN made possible?
In advance many thanks


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.