Hi everyone,
I hope someone is able to help me in the right direction. I am trying to do all the mapping on our database, which unfortunately i am not able to modify. The problem is between two tables using composite keys.
I have the following two tables:
AppNo:
Code:
AppNo (PK)
Country (PK)
Description
Etc...
AppNo_prices:
Code:
AppNo (PK)
Country (PK)
Price
Which is linked using the AppNo & Country as composite primiary keys.
Is this possible to do at all? Does anyone have any examples of this?
I have looked at the following examples:
http://java-aap.blogspot.com/2006/04/hibernate-annotations-composite.html
http://boris.kirzner.info/blog/archives/2008/07/19/hibernate-annotations-the-many-to-many-association-with-composite-key/
I have tried to use the @Embeddable in the same way, but they do not really do what i need.
Hibernate version:
Hibernate 3.2.1
Hibernate Annotations 3.4.0 GA
Thanks for all your help