users@glassfish.java.net

Re: JPA settings problem

From: <glassfish_at_javadesktop.org>
Date: Mon, 02 Jul 2007 14:09:31 PDT

You should definitely move the relationship into the Phone class.

For an example on composite keys, check out the classes LineItem and LineItemKey in the Javaee 5 tutorial:

http://java.sun.com/javaee/5/docs/tutorial/doc.

The classes can be found under

examples/ejb/order/order-ejb/src/java/order/entity

IMHO, PhonePk should only have the fields [i]number[/i] and [i]phoneType[/i].
[Message sent by forum member 'mf125085' (mf125085)]

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