AntonioJSG (16) [Avatar] Offline
#1
I am using Eclipse Link 1.2. on Glassfish 2.1

I want to ask,

Why has the foreign key be part of the primary key on OneToMany relationships ?

If I try to persist an Object with a one to many relationship, if one of the referenced column names is not part of the primary key on the Many side of the relationship, the field value is not set, so a database error occurs.

I have documented it on this thread.

http://www.manning-sandbox.com/thread.jspa?threadID=36656

I do not know If I an doing something wrong or the JPA should include this kind of mapping.

Regards

Antonio