-->
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.  [ 3 posts ] 
Author Message
 Post subject: I18N data schema an "Join" mappig
PostPosted: Tue Jul 26, 2005 10:41 am 
Beginner
Beginner

Joined: Tue May 10, 2005 4:18 am
Posts: 29
Hello All
I have tried searching for this topic without good results.

I have a classical I18N data schema :

table Item(id int)
table Item_Locale(id int, locale char (10) , item_title text, item_description text)

a record in Item-Locale table will look like this :
id | locale | title | description
1 | en-us | "blah " | "blah blah"

Off course I have a class for item with the fields "id (int), title(String), description(String)".

Now - the mapping :
I guess I should do it with the <join> tag, but I also have to inject the locale in some way.. right ?

Is this possible in Hibernate ?


Thank you in advance.

Elad


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 26, 2005 11:29 am 
Expert
Expert

Joined: Thu Dec 04, 2003 12:36 pm
Posts: 275
Location: Bielefeld, Germany
This might help you:
http://blog.hibernate.org/cgi-bin/blosx ... 06/23#i18n

Best regards
Sven


Top
 Profile  
 
 Post subject: Join Mapping
PostPosted: Wed Jul 27, 2005 2:56 am 
Beginner
Beginner

Joined: Tue May 10, 2005 4:18 am
Posts: 29
Hello again
Thank you for the link sven. I actually came across this link before, but I do not like the solution offered in relation to data schema. The solution ofers a an ID to each translated text, which in my opinion a bit of a waste.
In the solution I had in mind, all the translated columns of a table would be in only 1 table (Item_Locale) and the item ID would be the glue between the Iteam_Locale and the Item table. This way if you have 2 columns that needs to be translated, you will have only 1 record in the Item_Locale table, rather than 2 records in the suggested solution.

Do you have any thought related to having the "JOIN" mapping in this scenario ?

Thank you again

Elad


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.