I have the REGION table:
Code:
REG {
id number,
dateCreation Date
}
I have a LOCALE table:
Code:
LOCALE {
locale String
}
I have a REGION_DESCRIPTION table:
Code:
REGION_DESCRIPTION {
locale String,
regId number,
description
}
REGION_DESCRIPTION has a composite key: locale is a foreign key pointing to the LOCALE table. And regId points to the REGION table.
I would like to map this to my Region java class:
Code:
private List<RegionDescription> descriptions;
I tried different approache in JPA. But I cannot get the mapping to work. Any suggestions?