Hi,
Here is my question. I have two tables : Product and Translation. Translation contains both name and description of each product in several languages. The DDL looks like :
Code:
Product (
prod_id NUMBER(10) PRIMARY KEY,
name NUMBER(8),
description NUMBER(8)
);
Translation (
trans_id NUMBER(10) PRIMARY KEY,
code NUMBER(8) NOT NULL,
type NUMBER(3) NOT NULL,
value VARCHAR(200)
);
These are legacy tables. 'name' and 'description' in Product are related to 'code' in Translation, and not to the obvious 'trans_id'. The 'type' field indicates whether the translation is for a name, a description or something else.
What I would like to do is map a collection (set, map, whatever) of translations for the name and another for the description in the Product mapping, but I can't find a way. The <key /> element is mandatory and since 'trans_id' is not the foreign key, I don't know how to do it.
Any hint?