users@glassfish.java.net

Re: Toplink NullPointerException with compound primary key?

From: <glassfish_at_javadesktop.org>
Date: Wed, 10 Sep 2008 13:37:35 PDT

Thanks very much for your help. While your suggestion wasn't what ultimately fixed the problem, it did lead me down what ended up being the proper path.

My compound primary key (my @Embeddable PK class) was designating [i]its[/i] partyID field as insertable, and the @ManyToOne Party field in the binding class was [i]not[/i] designated as insertable. I switched these around so that the PK key was, oddly enough, not insertable--I thought it was arbitrary, if you have two mappings to the same column, which inserts and which just reads, provided that all but one are marked read-only, but apparenlty not--and everything worked fine.

Best,
Laird
[Message sent by forum member 'ljnelson' (ljnelson)]

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