|
|
(20 intermediate revisions by the same user not shown) |
Line 1: |
Line 1: |
− | {{EclipseLink_Examples
| |
− | |example=*[[EclipseLink/Examples/JPA/EclipseLink-ORM.XML|EclipseLink-ORM.XML]]
| |
− | *[[EclipseLink/Examples/JPA/EmployeeXML|Employee application]]
| |
− | }}
| |
| | | |
− | =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.
| |
− | {{EclispeLink_Note
| |
− | |note=Using the '''eclipselink-orm.xml''' mapping file will enable many EclipseLink advanced features, but may prevent the persistence unit from being portable to other JPA implementations.}}
| |
| | | |
− | The '''EclipseLink-ORM.XML''' file defines the 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 easy to override.
| |
− | {{EclipseLink_Spec
| |
− | |link=
| |
− | |section=Section 10.1 "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 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]]}}
| + | |
Latest revision as of 11:50, 25 January 2013
See "Specifying EclipseLink Object-XML Mappings Using eclipselink-oxm.xml" in the EclipseLink Concepts Guide