Hibernate version: 2.1
I could not find a post related to this. Pardon me, if this or related question is already posted.
I have the following object hierarchy:
1. Order has orderId as Primary Key (PK). It may have one or more OrderDetail objects
2. OrderDetail has (orderId + orderLineNumber) as PK. Each OrderDetail may have one or more Tax objects
3. Tax has (orderId + orderLineNumber + taxTypeCode) as PK.
I was not able to define the <composite-id> for the Tax with OrderDetail as <many-to-one> relation.
How do we define this relationship in Hibernate when I need:
Option 1: Navigable from both directions
Option 2: Navigable from Order to OrderDetail to Tax
I am okay with list, set, map, or bag representation.
Thanks,
_________________ joshi
|