Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "EclipseLink/UserGuide/JPA/Basic JPA Development/Configuration/JPA/eclipselink-orm.xml"

m (eclipselink-orm.xml)
m (eclipselink-orm.xml)
Line 13: Line 13:
 
}}
 
}}
  
 
+
==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.  
 
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 [[EclipseLink/UserGuide/JPA/Basic JPA Development/Configuration/JPA/Overriding and Merging|Overriding and Merging]] for more information
  
  
 
{{EclipseLink_JPA
 
{{EclipseLink_JPA
 
|previous=[[EclipseLink/UserGuide/JPA/Basic JPA Development/Configuration/JPA/Defaults|Defaults]]
 
|previous=[[EclipseLink/UserGuide/JPA/Basic JPA Development/Configuration/JPA/Defaults|Defaults]]
|next=[[EclipseLink/UserGuide/JPA/Basic JPA Development/Configuration/JPA/Mapping|Mapping]]
+
|next=[[EclipseLink/UserGuide/JPA/Basic JPA Development/Configuration/JPA/Overriding and Merging|Overriding and Merging]]
 
|up=[[EclipseLink/UserGuide/JPA/Basic JPA Development/Configuration|Configuration]]}}
 
|up=[[EclipseLink/UserGuide/JPA/Basic JPA Development/Configuration|Configuration]]}}

Revision as of 14:40, 16 June 2010

eclipselink-orm.xml

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. For more information on JPA extensions for mapping, see Using EclipseLink JPA Extensions.

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.

Elug javaspec icon.gif

For more information, see Section 10.1 "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


Eclipselink-logo.gif
Version: DRAFT
Other versions...

Back to the top