Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] Using EclipseLink extensions from XML butalongside normal orm.xml?

Hi Laird,
 
You are correct. Any extensions you provide in the eclipselink-orm.xml file will applied above the jpa configurations.
 
Note though, currently to use the override functionality the eclispelink-orm.xml must be named and located here META-INF/eclipselink-orm.xml otherwise it is treated like any other mapping file and having a mapping to the same attribute for the same entity defined in two different mapping files is not  supported.
 
Cheers,
Guy
----- Original Message -----
Sent: Wednesday, June 03, 2009 2:38 PM
Subject: [eclipselink-users] Using EclipseLink extensions from XML butalongside normal orm.xml?

Hello.  I see from here:

 http://wiki.eclipse.org/EclipseLink/Examples/JPA/EclipseLink-ORM.XML

...that I can sprinkle EclipseLink "annotations" in an eclipselink-orm.xml file located in META-INF (or anywhere else).

Do I understand correctly that the order of evaluation will be, without any other configuration on my part:
  • Annotations first
  • JPA META-INF/orm.xml next
  • META-INF/eclipselink-orm.xml last
...?

I'm looking to make use of EclipseLink's type conversion features when EclipseLink is installed as the persistence provider, but I don't want to do this via annotations, since I don't want to drag along the EclipseLink jars only to find out that someone is installing my code in a Hibernate installation.  So for boolean columns, for example, I want to indicate in eclipselink-orm.xml that a particular Converter should be used.  Am I correct that the best way to do this non-intrusively is to sparsely populate a META-INF/eclipselink-orm.xml file with only those mappings where EclipseLink extensions are being used?

Thank you,
Laird


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

Back to the top