users@glassfish.java.net

RE: Lazy OneToOne with composite key failing

From: Gordon Yorke <gordon.yorke_at_oracle.com>
Date: Fri, 6 Jul 2007 13:54:03 -0400

What is your deployment environment? Do other entities in your persistence unit have lazy relationships? Is it only the read-only mapping that is failing with this error?
--Gordon

-----Original Message-----
From: Shevland, Joe [mailto:joe.shevland_at_capgemini.com]
Sent: Thursday, July 05, 2007 9:49 PM
To: users_at_glassfish.dev.java.net
Subject: RE: Lazy OneToOne with composite key failing



> I've been trying to setup a unidirectional @OneToOne
> relationship between two entities, say EntityA and EntityB.
> Both use the same @MappedSuperclass which has a composite
> primary key class using @EmbeddedId.

Just to update, using an eager fetch with the @JoinColumns marked as
insertable=false, updatable=false fixes the problem. This sounds like
one of the other bugs I came across when googling the issue, but from
what I could tell it was fixed a while before build 50, unless it's a
regression or I need to update the Toplink libs or something.

Cheers
Joe

This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
For additional commands, e-mail: users-help_at_glassfish.dev.java.net