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 (Replacing page with ' '''Warning See "Specifying EclipseLink Object-XML Mappings Using eclipselink-oxm.xml" in the [http://www.eclipse.org/eclipselink/documentation/...')
 
(10 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{EclipseLink_UserGuide
 
|info=y
 
|toc=n
 
|eclipselink=y
 
|eclipselinktype=JPA
 
|examples=y
 
|example=*[[EclipseLink/Examples/JPA/EclipseLink-ORM.XML|EclipseLink-ORM.XML]]
 
*[[EclipseLink/Examples/JPA/EmployeeXML|Employee application]]
 
}}
 
  
=Specifying EclipseLink Object-Relational Mappings Using 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 to provide extended ORM features.
 
{{EclipseLink_Note
 
|note=Using the '''eclipselink-orm.xml''' mapping file enables many EclipseLink advanced features, but it may prevent the persistence unit from being portable to other JPA implementations.}}
 
  
The '''eclipselink-orm.xml''' file defines object-relational mapping metadata for EclipseLink. It is built from the existing [[EclipseLink/UserGuide/JPA/Basic JPA Development/Configuration/JPA/orm.xml|orm.xml file]] which makes it more intuitive, requires minimum configuration, and makes it easy to override.
 
{{EclipseLink_Spec
 
|link=
 
|section=Section 12.2 "XML Overriding Rules"
 
}}
 
  
==Overriding and Merging==
+
'''[[Image:Elug_draft_icon.png|Warning]] See "Specifying EclipseLink Object-XML Mappings Using eclipselink-oxm.xml" in the [http://www.eclipse.org/eclipselink/documentation/ EclipseLink Concepts Guide]'''
To override the '''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
+
|previous=[[EclipseLink/UserGuide/JPA/Basic JPA Development/Configuration/JPA/Defaults|Defaults]]
+
|next=[[EclipseLink/UserGuide/JPA/Basic JPA Development/Configuration/JPA/Overriding and Merging|Overriding and Merging]]
+
|up=[[EclipseLink/UserGuide/JPA/Basic JPA Development/Configuration|Configuration]]
+
|version=2.2.0 DRAFT}}
+

Latest revision as of 11:50, 25 January 2013


Warning See "Specifying EclipseLink Object-XML Mappings Using eclipselink-oxm.xml" in the EclipseLink Concepts Guide

Back to the top