Hi,
I need your help to map the following many-to-one relationship (PRODUCT->CATEGORY). Supose I have 2 tables with composite primary keys:
PRODUCT
-----------
[PK] company
[PK] product_code
product_name
product_category
Primary key: company,product_code
CATEGORY
-------------
[PK] company
[PK] category_code
category_name
Primary key: company,category_code
The Foreign Key is PRODUCT.company=CATEGORY.company AND PRODUCT.product_category=CATEGORY.category_code
What is the product's hbm.xml file?
Thanks
Clayton
|