users@glassfish.java.net

Re: JPA foreign composite key problems

From: <glassfish_at_javadesktop.org>
Date: Thu, 29 Nov 2007 09:17:49 PST

Hi Tom,

If you use ToplinkEssentials (which is the default JPA provider in GlassFish), you can try to map the BASEID column in the Dep class twice - one as a simple type for the Id, and another as a OneToOne relationship of the Base type. Mark the relationship field as insertable/updateable=false.

Regards,
-marina
[Message sent by forum member 'mvatkina' (mvatkina)]

http://forums.java.net/jive/thread.jspa?messageID=247846