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.
Difference between revisions of "EclipseLink/Examples/JPA/EclipseLink-ORM.XML"
(New page: In EclipseLink 1.0 the new eclipselink-orm.xml mapping file is introduced ([http://bugs.eclipse.org/200040 See bug 200040]). This mapping file can be used in place of JPA's standard mappin...) |
|||
Line 5: | Line 5: | ||
The [http://www.eclipse.org/eclipselink/xsds/eclipselink_orm_1_0.xsd EclipseLink ORM schema (eclipselink_orm_1_0.xsd)] can be used with the following header: | The [http://www.eclipse.org/eclipselink/xsds/eclipselink_orm_1_0.xsd EclipseLink ORM schema (eclipselink_orm_1_0.xsd)] can be used with the following header: | ||
+ | <code> | ||
+ | <?xml version="1.0" encoding="windows-1252" ?> | ||
+ | <entity-mappings xsi:schemaLocation="http://www.eclipse.org/eclipselink/xsds/orm xsd/eclipselink_orm_1_0.xsd" | ||
+ | version="1.0" | ||
+ | xmlns="http://www.eclipse.org/xml/ns/persistence/orm" | ||
+ | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | ||
+ | </code> | ||
== Configuring usage in persistence.xml == | == Configuring usage in persistence.xml == | ||
A persistence unit can use one or more of these mapping files in the same way a standard JPA ORM mapping XML file can be used. The default location of <pre>/META-INF/orm.xml</pre> | A persistence unit can use one or more of these mapping files in the same way a standard JPA ORM mapping XML file can be used. The default location of <pre>/META-INF/orm.xml</pre> |
Revision as of 21:50, 28 March 2008
In EclipseLink 1.0 the new eclipselink-orm.xml mapping file is introduced (See bug 200040). This mapping file can be used in place of JPA's standard mapping file or can be used to override a JPA mapping file. In additional to allowing all of the standard JPA mapping capabilities it also includes advanced mapping types and options.
XML Configuration
The EclipseLink ORM schema (eclipselink_orm_1_0.xsd) can be used with the following header:
<?xml version="1.0" encoding="windows-1252" ?>
<entity-mappings xsi:schemaLocation="http://www.eclipse.org/eclipselink/xsds/orm xsd/eclipselink_orm_1_0.xsd"
version="1.0"
xmlns="http://www.eclipse.org/xml/ns/persistence/orm"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
Configuring usage in persistence.xml
A persistence unit can use one or more of these mapping files in the same way a standard JPA ORM mapping XML file can be used. The default location of/META-INF/orm.xml