Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Composite Key consisting of an Entity and a Property

 
Frankie Fuentes
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Can please someone show me an exhaustive example of ways in how I could make a mapping of a primary key that consist of a property plus an entity.

Say I have:



Much appreciated.
 
Frankie Fuentes
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've found the solution:



http://download-llnw.oracle.com/javaee/6/api/javax/persistence/MapsId.html

But my problem is that @MapsId is only available for JPA 2. How should I code this for JPA 1.0?

Thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic