Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] eclipselink-orm overriding issue

HI Laird,

This is intentional as the overriding is at the mapping level. The contents of a @OneToMany will not merge with a <many-to-one> and the defaults will be applied if not specified as we assume that is part of the intended override.

Cheers,
Guy

On 17/06/2013 4:34 PM, Laird Nelson wrote:
I have a @OneToMany annotation in an entity that I'm maintaining.

It features a mappedBy attribute.

When I override this setting with an eclipselink-orm.xml entry, I find that I must include mapped-by in my one-to-many element.  In other words, the attribute present in the annotation does not "leak through"--the eclipselink-orm.xml element seems to stomp on the @OneToMany annotation in its entirety.

If I don't include the mapped-by attribute, then EclipseLink behaves as though such information was never specified anywhere--that is, it starts looking around for the default join table that would exist in such a case, and of course that's not how I have things mapped.

I was under the impression that as long as you put the minimal amount of information necessary in an orm.xml or eclipselink-orm.xml element the other attribute values would be used from the annotation being overridden.  Am I mistaken, or is this a bug?

Thanks,


_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users

--

Oracle
Guy Pelletier

ORACLE Canada, 45 O'Connor Street Suite 400 Ottawa, Ontario Canada K1P 1A4

Green
            Oracle Oracle is committed to developing practices and products that help protect the environment


Back to the top