| <?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 |
| |
| --> |
| |
| <entity-mappings version="1.0" 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_1_0.xsd"> |
| <description>Merge of XML and Annotations Inherited Test Model Instance Document</description> |
| <table-generator name="MERGE_BEER_TABLE_GENERATOR" table="CMP3_MERGE_BEER_SEQ" pk-column-name="SEQ_NAME" value-column-name="SEQ_COUNT" pk-column-value="BEER_SEQ"/> |
| |
| <named-native-query name="findAnyMergeSQLBeerConsumer" result-class="org.eclipse.persistence.testing.models.jpa.xml.merge.inherited.BeerConsumer"> |
| <query>SELECT * FROM CMP3_MERGE_CONSUMER</query> |
| <hint name="cascadeLevel" value="1"/> |
| <hint name="eclipselink.jdbc.allow-native-sql-query" value="true"/> |
| </named-native-query> |
| |
| <named-native-query name="findAllMergeSQLCertifications" result-set-mapping="certificationResults"> |
| <query>SELECT * FROM CMP3_MERGE_CERTIFICATION</query> |
| <hint name="eclipselink.jdbc.allow-native-sql-query" value="true"/> |
| </named-native-query> |
| |
| <sql-result-set-mapping name="certificationResults"> |
| <entity-result entity-class="org.eclipse.persistence.testing.models.jpa.xml.merge.inherited.Certification"> |
| <field-result name="id" column="ID"/> |
| <field-result name="description" column="DESCRIPTION"/> |
| <field-result name="beerConsumer" column="CONSUMER_ID"/> |
| </entity-result> |
| </sql-result-set-mapping> |
| |
| <mapped-superclass class="org.eclipse.persistence.testing.models.jpa.xml.merge.inherited.Beverage" access="FIELD"> |
| <!-- This superclass is completely defined in XML, source has no annotations --> |
| <attributes> |
| <id name="id"> |
| <column name="ID"/> |
| <generated-value strategy="TABLE" generator="MERGE_BEER_TABLE_GENERATOR"/> |
| </id> |
| <transient name="transientString"/> |
| </attributes> |
| </mapped-superclass> |
| |
| <mapped-superclass class="org.eclipse.persistence.testing.models.jpa.xml.merge.inherited.Beer" metadata-complete="true" access="FIELD"> |
| <!-- All annotations should be ignored due to the metadata-complete tag in mapped-superclass --> |
| <exclude-default-listeners/> |
| <!--exclude-superclass-listeners/--> |
| <entity-listeners> |
| <entity-listener class="org.eclipse.persistence.testing.models.jpa.xml.merge.inherited.BeerListener"> |
| <post-persist method-name="postPersist"/> |
| </entity-listener> |
| </entity-listeners> |
| <attributes> |
| <version name="version"/> |
| <many-to-one name="beerConsumer" target-entity="org.eclipse.persistence.testing.models.jpa.xml.merge.inherited.BeerConsumer"> |
| <join-column name="C_ID"/> |
| </many-to-one> |
| <embedded name="embeddedSerialNumber"/> |
| </attributes> |
| </mapped-superclass> |
| |
| <mapped-superclass class="org.eclipse.persistence.testing.models.jpa.xml.merge.inherited.ParentTelephoneNumber" access="PROPERTY"> |
| <!-- Testing the id-class XML element, source has no annotations --> |
| <id-class class="org.eclipse.persistence.testing.models.jpa.xml.merge.inherited.TelephoneNumberPK"/> |
| </mapped-superclass> |
| |
| <mapped-superclass class="org.eclipse.persistence.testing.models.jpa.xml.merge.inherited.WorkPeriod" access="FIELD"> |
| <!-- This superclass is completely defined in XML, source has no annotations --> |
| <attributes> |
| <basic name="startDate"> |
| <column name="S_DATE"/> |
| <temporal>DATE</temporal> |
| </basic> |
| <basic name="endDate"> |
| <column name="E_DATE"/> |
| <temporal>DATE</temporal> |
| </basic> |
| </attributes> |
| </mapped-superclass> |
| |
| </entity-mappings> |