Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » foreign keys in composite primary keys
foreign keys in composite primary keys [message #381404] Thu, 25 September 2008 07:52 Go to previous message
Knut Wannheden is currently offline Knut Wannheden
Messages: 283
Registered: July 2009
Senior Member
Hi all

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?

Thanks

--knut
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic:EclipseLink with JBoss and MySQL
Next Topic:Content provider with a long loading time
Goto Forum:
  


Current Time: Sat May 25 18:14:23 EDT 2013

Powered by FUDForum. Page generated in 0.01645 seconds