posted 15 years ago
Hi everybody!
I need help with JPA (Toplink) mapping.
I have 3 classes: Products, ProductsDescription and ProductsDescriptionPK.
Products has 1 ID: products_id
ProductsDescription has 2 IDs: products_id and language_id which is in ProductsDescriptionPK, so ProductsDescription has EmbeddedId: ProductsDescriptionPK.
Since 1 product can have many descriptions in different languages,
I wish to bind @OneToMany Products with ProductsDescription by using
products_id, but I can't figure it out how to do it since ProductsDescription has composite key.
Basically I wish to have Collection<ProductsDescription>
in Products which are bindded with its ProductsDescription. Here are the following classes.
Thanks
[ December 17, 2008: Message edited by: Alaneus Kingingestingest ]
[ December 17, 2008: Message edited by: Alaneus Kingingestingest ]