Difference between revisions of "EclipseLink/UserGuide/JPA/Basic JPA Development/Configuration/JPA/eclipselink-orm.xml"
|Line 14:||Line 14:|
|section=Section ."XML Overriding Rules"
Revision as of 17:07, 11 January 2011
|Mailing List • Forums • IRC|
You can use EclipseLink’s native metadata xml file, EclipseLink-ORM.XML, to override mappings defined in JPA’s configuration file orm.xml and provide EclipseLink with extended ORM features.
The EclipseLink-ORM.XML file defines the object-relational mapping metadata for EclipseLink. It is built from the existing orm.xml file which makes it more intuitive, requires minimum configuration, and easy to override.
For more information, see Section 12.2 "XML Overriding Rules" in the JPA Specification.
Overriding and Merging
To override orm.xml file's mapping, you must define the META-INF/eclipselink-orm.xml file in the project. When both orm.xml and eclipselink-orm.xml are specified, the contents of eclipselink-orm.xml override orm.xml and any other JPA mapping file specified in the persistence unit. If there are overlapping specifications in multiple ORM files, the files are merged if they are no conflicting entities.
See Overriding and Merging for more information