I'm new to JPA and EclipseLink and hit some problems regarding primary
keys composed of one or multiple foreign keys.
1. What's the recommended EclipseLink approach when an entity with a
composite primary key also has relations (e.g. many-to-one) using a
constituent of the primary key as foreign key? I found a nice summary of
the problem on this wiki page: http://en.wikibooks.org/wiki/Java_Persistence/Identity_and_S equencing#Primary_Keys_through_OneToOne_Relationships.
There are actually some references to how this should be done in
EclipseLink, but I couldn't quite figure it out.
2. A related but different problem arises with join tables where one
would like to add additional columns to the table. Also this is
described on the wiki:
[http://en.wikibooks.org/wiki/Java_Persistence/ManyToMany]. Does
EclipseLink have something to offer here?