Part of Composite-Id is foreign Key:How specify in Mapping?
posted 8 years ago
I have 2 classes viz. Product and ProductBasic having one-to-one relationship
Product is mapped to a table PRODUCT which has PRODUCTID as PK.
ProductBasic is mapped to a table PRODUCTBASIC which has PRODUCTID,USECODE and STARTTTIME as composite key.
Also PRODUCTID (of PRODUCTBASIC table) is the foreign key referencing PRODUCT table...
How can i define my one-to-one mapping considering ProductBasic.productId should get its value from Product.productId ?