blob: cd5657816312cb0a6830100f161b150b9c0619e0 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<!-- AtestCatalog metadata in xml -->
<entity-mappings xmlns="http://java.sun.com/xml/ns/persistence/orm"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm orm_2_0.xsd"
version="2.0">
<package>embeddableXml</package>
<entity name="EntityA_Coll_StringXml"
class="org.apache.openjpa.persistence.embed.EntityA_Coll_StringXml"
access="FIELD">
<table name="EntityA_Coll_String_XML" />
<attributes>
<id name="id">
</id>
<basic name="name">
<column length="30" />
</basic>
<basic name="age" fetch="LAZY">
</basic>
<element-collection name="nickNames">
<column name="nickName_xml" length="20"/>
<collection-table name="NickNames_xml">
<join-column name="A_ID_xml" nullable="false"/>
<unique-constraint>
<column-name>A_ID_xml</column-name>
<column-name>nickName_xml</column-name>
</unique-constraint>
</collection-table>
</element-collection>
</attributes>
</entity>
<entity name="EntityA_Coll_Embed_EmbedXml"
class="org.apache.openjpa.persistence.embed.EntityA_Coll_Embed_EmbedXml"
access="FIELD">
<table name="EntityA_Coll_Embed_EmbedXML" />
<attributes>
<id name="id">
</id>
<basic name="name">
<column length="30" />
</basic>
<basic name="age" fetch="LAZY">
</basic>
<element-collection name="embeds">
</element-collection>
</attributes>
</entity>
<entity name="DepartmentXml"
class="org.apache.openjpa.persistence.embed.DepartmentXml"
access="FIELD">
<attributes>
<id name="deptId"></id>
<one-to-many name="empMap">
<map-key name="empId" />
<cascade>
<cascade-all />
</cascade>
</one-to-many>
</attributes>
</entity>
<entity name="EmployeeXml"
class="org.apache.openjpa.persistence.embed.EmployeeXml"
access="FIELD">
<attributes>
<id name="empId"></id>
<many-to-one name="department">
<join-column name="dept_id" />
</many-to-one>
</attributes>
</entity>
<entity name="ItemXml"
class="org.apache.openjpa.persistence.embed.ItemXml" access="FIELD">
<attributes>
<id name="id"></id>
<element-collection name="images"
target-class="java.lang.String">
<map-key-class class="java.lang.String" />
<map-key-column name="IMAGE_NAME" />
<column name="IMAGE_FILENAME" />
<collection-table name="IMAGE_XML" />
</element-collection>
</attributes>
</entity>
<entity name="DivisionXml"
class="org.apache.openjpa.persistence.embed.DivisionXml"
access="FIELD">
<attributes>
<id name="id"></id>
<basic name="name" />
</attributes>
</entity>
<entity name="VicePresidentXml"
class="org.apache.openjpa.persistence.embed.VicePresidentXml"
access="FIELD">
<attributes>
<id name="id"></id>
<basic name="name" />
</attributes>
</entity>
<entity name="CompanyXml"
class="org.apache.openjpa.persistence.embed.CompanyXml"
access="FIELD">
<attributes>
<id name="id"></id>
<one-to-many name="organization">
<map-key-join-column name="DIVISION" />
<join-table name="COMPANY_ORG_XML">
<join-column name="COMPANY" />
<inverse-join-column name="VP" />
</join-table>
</one-to-many>
</attributes>
</entity>
<entity name="CustomerXml"
class="org.apache.openjpa.persistence.embed.CustomerXml"
access="FIELD">
<table name="Customer_XML" />
<attributes>
<id name="id"></id>
<basic name="name" />
<one-to-many name="orders" mapped-by="cust"
orphan-removal="true" />
</attributes>
</entity>
<entity name="OrderXml"
class="org.apache.openjpa.persistence.embed.OrderXml"
access="FIELD">
<table name="Order_XML" />
<attributes>
<id name="id"></id>
<basic name="description" />
<many-to-one name="cust">
<join-column name="CUST_ID" nullable="false" />
</many-to-one>
</attributes>
</entity>
<entity name="CustomerXml1"
class="org.apache.openjpa.persistence.embed.attrOverrides.CustomerXml"
access="FIELD">
<attributes>
<id name="id"><column length="12"/></id>
<basic name="name"><column length="12"/></basic>
<embedded name="address">
<attribute-override name="state">
<column name="ADDR_STATE" />
</attribute-override>
<attribute-override name="zipcode.zip">
<column name="ADDR_ZIP" />
</attribute-override>
</embedded>
</attributes>
</entity>
<embeddable
class="org.apache.openjpa.persistence.embed.attrOverrides.AddressXml"
access="FIELD">
<attributes>
<basic name="street"><column length="12"/>
</basic>
<basic name="city"><column length="12"/></basic>
<basic name="state"><column length="12"/></basic>
<embedded name="zipcode"/>
</attributes>
</embeddable>
<embeddable
class="org.apache.openjpa.persistence.embed.attrOverrides.ZipcodeXml"
access="FIELD">
<attributes>
<basic name="zip"><column length="12"/></basic>
<basic name="plusFour"><column length="12"/></basic>
</attributes>
</embeddable>
<embeddable
class="org.apache.openjpa.persistence.embed.Embed_EmbedXml"
access="FIELD">
<attributes>
<basic name="intVal1"></basic>
<basic name="intVal2"></basic>
<basic name="intVal3"></basic>
<embedded name="embed">
<attribute-override name="intVal1">
<column name="embed_intVal1" />
</attribute-override>
<attribute-override name="intVal2">
<column name="embed_intVal2" />
</attribute-override>
<attribute-override name="intVal3">
<column name="embed_intVal3" />
</attribute-override>
</embedded>
</attributes>
</embeddable>
<embeddable class="org.apache.openjpa.persistence.embed.EmbedXml"
access="FIELD">
<attributes>
<basic name="intVal1"></basic>
<basic name="intVal2"></basic>
<basic name="intVal3"></basic>
</attributes>
</embeddable>
</entity-mappings>