| <?xml version="1.0" encoding="UTF-8"?> |
| <!-- |
| |
| Copyright (c) 2018, 2020 Oracle and/or its affiliates. All rights reserved. |
| |
| This program and the accompanying materials are made available under the |
| terms of the Eclipse Public License v. 2.0 which is available at |
| http://www.eclipse.org/legal/epl-2.0, |
| or the Eclipse Distribution License v. 1.0 which is available at |
| http://www.eclipse.org/org/documents/edl-v10.php. |
| |
| SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause |
| |
| --> |
| |
| <object-persistence version="Eclipse Persistence Services - 1.0.2 (Build 20081024)" xmlns="http://www.eclipse.org/eclipselink/xsds/persistence" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:eclipselink="http://www.eclipse.org/eclipselink/xsds/persistence"> |
| <name>NativeAPITestProject</name> |
| <class-mapping-descriptors> |
| <class-mapping-descriptor xsi:type="relational-class-mapping-descriptor"> |
| <class>org.eclipse.persistence.testing.models.nativeapitest.Address</class> |
| <alias>Address</alias> |
| <primary-key> |
| <field table="NAT_ADDRESS" name="ADDRESS_ID" xsi:type="column"/> |
| </primary-key> |
| <events xsi:type="event-policy"/> |
| <querying xsi:type="query-policy"/> |
| <attribute-mappings> |
| <attribute-mapping xsi:type="direct-mapping"> |
| <attribute-name>city</attribute-name> |
| <field table="NAT_ADDRESS" name="CITY" xsi:type="column"/> |
| </attribute-mapping> |
| <attribute-mapping xsi:type="direct-mapping"> |
| <attribute-name>country</attribute-name> |
| <field table="NAT_ADDRESS" name="COUNTRY" xsi:type="column"/> |
| </attribute-mapping> |
| <attribute-mapping xsi:type="one-to-many-mapping"> |
| <attribute-name>employees</attribute-name> |
| <reference-class>org.eclipse.persistence.testing.models.nativeapitest.Employee</reference-class> |
| <target-foreign-key> |
| <field-reference> |
| <source-field table="NAT_EMPLOYEE" name="ADDR_ID" xsi:type="column"/> |
| <target-field table="NAT_ADDRESS" name="ADDRESS_ID" xsi:type="column"/> |
| </field-reference> |
| </target-foreign-key> |
| <container xsi:type="list-container-policy"> |
| <collection-type>org.eclipse.persistence.indirection.IndirectList</collection-type> |
| </container> |
| <indirection xsi:type="transparent-collection-indirection-policy"/> |
| <selection-query xsi:type="read-all-query"> |
| <container xsi:type="list-container-policy"> |
| <collection-type>org.eclipse.persistence.indirection.IndirectList</collection-type> |
| </container> |
| </selection-query> |
| </attribute-mapping> |
| <attribute-mapping xsi:type="direct-mapping"> |
| <attribute-name>id</attribute-name> |
| <field table="NAT_ADDRESS" name="ADDRESS_ID" xsi:type="column"/> |
| </attribute-mapping> |
| <attribute-mapping xsi:type="direct-mapping"> |
| <attribute-name>postalCode</attribute-name> |
| <field table="NAT_ADDRESS" name="P_CODE" xsi:type="column"/> |
| </attribute-mapping> |
| <attribute-mapping xsi:type="direct-mapping"> |
| <attribute-name>province</attribute-name> |
| <field table="NAT_ADDRESS" name="PROVINCE" xsi:type="column"/> |
| </attribute-mapping> |
| <attribute-mapping xsi:type="direct-mapping"> |
| <attribute-name>street</attribute-name> |
| <field table="NAT_ADDRESS" name="STREET" xsi:type="column"/> |
| </attribute-mapping> |
| </attribute-mappings> |
| <descriptor-type>independent</descriptor-type> |
| <sequencing> |
| <sequence-name>ADDRESS_SEQ</sequence-name> |
| <sequence-field table="NAT_ADDRESS" name="ADDRESS_ID" xsi:type="column"/> |
| </sequencing> |
| <instantiation/> |
| <copying xsi:type="instantiation-copy-policy"/> |
| <tables> |
| <table name="NAT_ADDRESS"/> |
| </tables> |
| </class-mapping-descriptor> |
| <class-mapping-descriptor xsi:type="relational-class-mapping-descriptor"> |
| <class>org.eclipse.persistence.testing.models.nativeapitest.Department</class> |
| <alias>Department</alias> |
| <primary-key> |
| <field table="NAT_DEPT" name="ID" xsi:type="column"/> |
| </primary-key> |
| <events xsi:type="event-policy"/> |
| <querying xsi:type="query-policy"/> |
| <attribute-mappings> |
| <attribute-mapping xsi:type="one-to-many-mapping"> |
| <attribute-name>employees</attribute-name> |
| <reference-class>org.eclipse.persistence.testing.models.nativeapitest.Employee</reference-class> |
| <target-foreign-key> |
| <field-reference> |
| <source-field table="NAT_EMPLOYEE" name="DEPT_ID" xsi:type="column"/> |
| <target-field table="NAT_DEPT" name="ID" xsi:type="column"/> |
| </field-reference> |
| </target-foreign-key> |
| <container xsi:type="list-container-policy"> |
| <collection-type>org.eclipse.persistence.indirection.IndirectList</collection-type> |
| </container> |
| <indirection xsi:type="transparent-collection-indirection-policy"/> |
| <selection-query xsi:type="read-all-query"> |
| <container xsi:type="list-container-policy"> |
| <collection-type>org.eclipse.persistence.indirection.IndirectList</collection-type> |
| </container> |
| </selection-query> |
| </attribute-mapping> |
| <attribute-mapping xsi:type="direct-mapping"> |
| <attribute-name>id</attribute-name> |
| <field table="NAT_DEPT" name="ID" xsi:type="column"/> |
| </attribute-mapping> |
| <attribute-mapping xsi:type="direct-collection-mapping"> |
| <attribute-name>managers</attribute-name> |
| <container xsi:type="list-container-policy"> |
| <collection-type>org.eclipse.persistence.indirection.IndirectList</collection-type> |
| </container> |
| <indirection xsi:type="transparent-collection-indirection-policy"/> |
| <selection-query xsi:type="direct-read-query"> |
| <maintain-cache>false</maintain-cache> |
| <container xsi:type="list-container-policy"> |
| <collection-type>org.eclipse.persistence.indirection.IndirectList</collection-type> |
| </container> |
| </selection-query> |
| <reference-table>NAT_EMPLOYEE</reference-table> |
| <direct-field table="NAT_EMPLOYEE" name="MANAGER_EMP_ID" xsi:type="column"/> |
| <reference-foreign-key> |
| <field-reference> |
| <source-field table="NAT_EMPLOYEE" name="DEPT_ID" xsi:type="column"/> |
| <target-field table="NAT_DEPT" name="ID" xsi:type="column"/> |
| </field-reference> |
| </reference-foreign-key> |
| </attribute-mapping> |
| <attribute-mapping xsi:type="direct-mapping"> |
| <attribute-name>name</attribute-name> |
| <field table="NAT_DEPT" name="NAME" xsi:type="column"/> |
| </attribute-mapping> |
| </attribute-mappings> |
| <descriptor-type>independent</descriptor-type> |
| <sequencing> |
| <sequence-name>DEPT_SEQ</sequence-name> |
| <sequence-field table="NAT_DEPT" name="ID" xsi:type="column"/> |
| </sequencing> |
| <instantiation/> |
| <copying xsi:type="instantiation-copy-policy"/> |
| <tables> |
| <table name="NAT_DEPT"/> |
| </tables> |
| </class-mapping-descriptor> |
| <class-mapping-descriptor xsi:type="relational-class-mapping-descriptor"> |
| <class>org.eclipse.persistence.testing.models.nativeapitest.Employee</class> |
| <alias>Employee</alias> |
| <primary-key> |
| <field table="NAT_EMPLOYEE" name="EMP_ID" xsi:type="column"/> |
| </primary-key> |
| <events xsi:type="event-policy"/> |
| <querying xsi:type="query-policy"/> |
| <attribute-mappings> |
| <attribute-mapping xsi:type="one-to-one-mapping"> |
| <attribute-name>address</attribute-name> |
| <reference-class>org.eclipse.persistence.testing.models.nativeapitest.Address</reference-class> |
| <foreign-key> |
| <field-reference> |
| <source-field table="NAT_EMPLOYEE" name="ADDR_ID" xsi:type="column"/> |
| <target-field table="NAT_ADDRESS" name="ADDRESS_ID" xsi:type="column"/> |
| </field-reference> |
| </foreign-key> |
| <foreign-key-fields> |
| <field table="NAT_EMPLOYEE" name="ADDR_ID" xsi:type="column"/> |
| </foreign-key-fields> |
| <selection-query xsi:type="read-object-query"/> |
| </attribute-mapping> |
| <attribute-mapping xsi:type="one-to-one-mapping"> |
| <attribute-name>department</attribute-name> |
| <reference-class>org.eclipse.persistence.testing.models.nativeapitest.Department</reference-class> |
| <foreign-key> |
| <field-reference> |
| <source-field table="NAT_EMPLOYEE" name="DEPT_ID" xsi:type="column"/> |
| <target-field table="NAT_DEPT" name="ID" xsi:type="column"/> |
| </field-reference> |
| </foreign-key> |
| <foreign-key-fields> |
| <field table="NAT_EMPLOYEE" name="DEPT_ID" xsi:type="column"/> |
| </foreign-key-fields> |
| <selection-query xsi:type="read-object-query"/> |
| </attribute-mapping> |
| <attribute-mapping xsi:type="direct-mapping"> |
| <attribute-name>firstName</attribute-name> |
| <field table="NAT_EMPLOYEE" name="L_NAME" xsi:type="column"/> |
| </attribute-mapping> |
| <attribute-mapping xsi:type="direct-mapping"> |
| <attribute-name>gender</attribute-name> |
| <field table="NAT_EMPLOYEE" name="GENDER" xsi:type="column"/> |
| </attribute-mapping> |
| <attribute-mapping xsi:type="direct-mapping"> |
| <attribute-name>id</attribute-name> |
| <field table="NAT_EMPLOYEE" name="EMP_ID" xsi:type="column"/> |
| </attribute-mapping> |
| <attribute-mapping xsi:type="direct-mapping"> |
| <attribute-name>lastName</attribute-name> |
| <field table="NAT_EMPLOYEE" name="F_NAME" xsi:type="column"/> |
| </attribute-mapping> |
| <attribute-mapping xsi:type="one-to-one-mapping"> |
| <attribute-name>manager</attribute-name> |
| <reference-class>org.eclipse.persistence.testing.models.nativeapitest.Employee</reference-class> |
| <foreign-key> |
| <field-reference> |
| <source-field table="NAT_EMPLOYEE" name="MANAGER_EMP_ID" xsi:type="column"/> |
| <target-field table="NAT_EMPLOYEE" name="EMP_ID" xsi:type="column"/> |
| </field-reference> |
| </foreign-key> |
| <foreign-key-fields> |
| <field table="NAT_EMPLOYEE" name="MANAGER_EMP_ID" xsi:type="column"/> |
| </foreign-key-fields> |
| <selection-query xsi:type="read-object-query"/> |
| </attribute-mapping> |
| <attribute-mapping xsi:type="direct-mapping"> |
| <attribute-name>payScale</attribute-name> |
| <field table="NAT_EMPLOYEE" name="PAY_SCALE" xsi:type="column"/> |
| </attribute-mapping> |
| <attribute-mapping xsi:type="direct-mapping"> |
| <attribute-name>status</attribute-name> |
| <field table="NAT_EMPLOYEE" name="STATUS" xsi:type="column"/> |
| </attribute-mapping> |
| <attribute-mapping xsi:type="direct-mapping"> |
| <attribute-name>version</attribute-name> |
| <field table="NAT_EMPLOYEE" name="VERSION" xsi:type="column"/> |
| </attribute-mapping> |
| </attribute-mappings> |
| <descriptor-type>independent</descriptor-type> |
| <sequencing> |
| <sequence-name>EMPLOYEE_SEQ</sequence-name> |
| <sequence-field table="NAT_EMPLOYEE" name="EMP_ID" xsi:type="column"/> |
| </sequencing> |
| <instantiation/> |
| <copying xsi:type="instantiation-copy-policy"/> |
| <tables> |
| <table name="NAT_EMPLOYEE"/> |
| </tables> |
| </class-mapping-descriptor> |
| <class-mapping-descriptor xsi:type="relational-class-mapping-descriptor"> |
| <class>org.eclipse.persistence.testing.models.nativeapitest.PhoneNumber</class> |
| <alias>PhoneNumber</alias> |
| <primary-key> |
| <field table="NAT_PHONENUMBER" name="OWNER_ID" xsi:type="column"/> |
| <field table="NAT_PHONENUMBER" name="TYPE" xsi:type="column"/> |
| </primary-key> |
| <events xsi:type="event-policy"/> |
| <querying xsi:type="query-policy"/> |
| <attribute-mappings> |
| <attribute-mapping xsi:type="direct-mapping"> |
| <attribute-name>areaCode</attribute-name> |
| <field table="NAT_PHONENUMBER" name="AREA_CODE" xsi:type="column"/> |
| </attribute-mapping> |
| <attribute-mapping xsi:type="direct-mapping"> |
| <attribute-name>number</attribute-name> |
| <field table="NAT_PHONENUMBER" name="NUMB" xsi:type="column"/> |
| </attribute-mapping> |
| <attribute-mapping xsi:type="one-to-one-mapping"> |
| <attribute-name>owner</attribute-name> |
| <reference-class>org.eclipse.persistence.testing.models.nativeapitest.Employee</reference-class> |
| <foreign-key> |
| <field-reference> |
| <source-field table="NAT_PHONENUMBER" name="OWNER_ID" xsi:type="column"/> |
| <target-field table="NAT_EMPLOYEE" name="EMP_ID" xsi:type="column"/> |
| </field-reference> |
| </foreign-key> |
| <foreign-key-fields> |
| <field table="NAT_PHONENUMBER" name="OWNER_ID" xsi:type="column"/> |
| </foreign-key-fields> |
| <selection-query xsi:type="read-object-query"/> |
| </attribute-mapping> |
| <attribute-mapping xsi:type="direct-mapping"> |
| <attribute-name>type</attribute-name> |
| <field table="NAT_PHONENUMBER" name="TYPE" xsi:type="column"/> |
| </attribute-mapping> |
| </attribute-mappings> |
| <descriptor-type>independent</descriptor-type> |
| <instantiation/> |
| <copying xsi:type="instantiation-copy-policy"/> |
| <tables> |
| <table name="NAT_PHONENUMBER"/> |
| </tables> |
| </class-mapping-descriptor> |
| </class-mapping-descriptors> |
| </object-persistence> |