Hi Everybody,
I'm an Hibernate newbie from now 2 weeks and I'm still confused about how to cleary design ternary associations.
Here's the asssociation I want to map :
Code:
ObjectA <--(0,n) -->[ternary_association] <-- (1,1) --> RightType
|
(0,n)
|
User
- An ObjectA can be manipulated by several Users,
- A User can manipulated several ObjectA,
- But one User has a unique RightType for a ObjectA.
So it means (but maybe I'm wrong) that I should have into the entity table a unique composed key, composed of the foreign keys of ObjectA and User, plus a many-to-one association to RightType.
Can somebody tell me how to do this mapping ?
Better approach ?
Thanks for any help,