persistence@glassfish.java.net

Re: (TopLink Essentials) bogus _at_JoinTable default value

From: Klaus Unger <UngerKlaus_at_gmx.de>
Date: Tue, 30 Oct 2007 18:00:04 +0100

Hi,

a uni-directional mapping is exactly what is intended. What tables it uses is
up to toplink as I let him create the ddls.

Let me please add that I already posted it in the oracle forums where it was
confirmed as bug and I was directed to report it to Glassfish.
http://forums.oracle.com/forums/thread.jspa?threadID=576956&tstart=15

I have to admit that I am seriously concerned about this - a default value of
an unidirectional one-to-many relationship does not seem like a complex rare
special error-prone case to me. I can not believe I am the first to stumble
upon this one, but I fear many might have given up and not taken the hard
time to find the real cause of this. This might also be related to the poor
error messages of toplink.

Don't get me wrong, I like toplink but I want to point things that should be
better.

- Klaus


> Klaus,
>
> Notice that a mappedBy for a OneToMany is required otherwise it will
> default to a uni-directional mapping that uses a JoinTable.
>
> See the following sections 9.1.24 and 2.1.8.5 from the spec for more
> information.
>
> Cheers,
> Guy