Hi,
I want to sore internationalized data, in a relative standard way, so that I will be able to reuse it.
So, I decided to use following "Label" table structure :
- label_id : int
- lang : varchar
- label : varchar
Primary key is a composite key (label_id, lang).
Firstly, I want to use this structure to store names of an item, here are attrbiuts of this "ite" object :
- item_id : int
- activated : string
- state : string
- names ????
I want to be able to do a "getNames" call on an "item" object and to get item names for all languages (in an Set containing Label objetcs for example ...).
I found a solution that works but it is necessary to create an intermediate table. Not really satisfying ... Il I want to reuse Label structure for other internationalized objets, I will have to create an intermediate table for each.
So, my question is :
How to declare ths relation (one-to-many) without modifying Label structure ?
Thanks a lot for your help.
Dany
|