| <?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. |
| --> |
| <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_1_0.xsd" |
| version="1.0"> |
| |
| <persistence-unit-metadata> |
| <xml-mapping-metadata-complete/> |
| </persistence-unit-metadata> |
| |
| |
| <package>org.apache.openjpa.persistence.jdbc.unique</package> |
| <entity name="UniqueA" class="UniqueA"> |
| <table name="UNIQUE_A_XML"> |
| <unique-constraint> |
| <column-name>a1x</column-name> |
| <column-name>a2x</column-name> |
| </unique-constraint> |
| <unique-constraint> |
| <column-name>a3x</column-name> |
| <column-name>a4x</column-name> |
| </unique-constraint> |
| </table> |
| <secondary-table name="UNIQUE_SECONDARY_XML"> |
| <unique-constraint> |
| <column-name>sa1x</column-name> |
| </unique-constraint> |
| </secondary-table> |
| <attributes> |
| <id name="aid"> |
| </id> |
| <basic name="a1"> |
| <column name="a1x"/> |
| </basic> |
| <basic name="a2"> |
| <column name="a2x"/> |
| </basic> |
| <basic name="a3"> |
| <column name="a3x"/> |
| </basic> |
| <basic name="a4"> |
| <column name="a4x"/> |
| </basic> |
| <basic name="a5"> |
| <column name="a5x"/> |
| </basic> |
| <basic name="a6"> |
| <column name="a6x"/> |
| </basic> |
| |
| <basic name="sa1"> |
| <column name="sa1x" table="UNIQUE_SECONDARY_XML" /> |
| </basic> |
| <basic name="sa2"> |
| <column name="sa2x" table="UNIQUE_SECONDARY_XML" /> |
| </basic> |
| |
| <many-to-many name="bs"> |
| <join-table name="UNIQUE_JOINTABLE_XML"> |
| <join-column name="FK_A_XML" referenced-column-name="aid" nullable="false"/> |
| <inverse-join-column name="FK_B_XML" referenced-column-name="bid" nullable="false"/> |
| <unique-constraint> |
| <column-name>FK_A_XML</column-name> |
| <column-name>FK_B_XML</column-name> |
| </unique-constraint> |
| </join-table> |
| </many-to-many> |
| </attributes> |
| </entity> |
| |
| <entity name="UniqueB" class="UniqueB"> |
| <table name="UNIQUE_B_XML"> |
| <unique-constraint> |
| <column-name>b1x</column-name> |
| <column-name>b2x</column-name> |
| </unique-constraint> |
| </table> |
| <attributes> |
| <id name="bid"> |
| <generated-value strategy="TABLE" |
| generator="testGeneratorXML" /> |
| <table-generator name="testGeneratorXML" |
| table="UNIQUE_GENERATOR_XML" pk-column-name="GEN1_XML" |
| value-column-name="GEN2_XML"> |
| <unique-constraint> |
| <column-name>GEN1_XML</column-name> |
| <column-name>GEN2_XML</column-name> |
| </unique-constraint> |
| </table-generator> |
| </id> |
| <basic name="b1"> |
| <column name="b1x"/> |
| </basic> |
| <basic name="b2"> |
| <column name="b2x"/> |
| </basic> |
| </attributes> |
| </entity> |
| </entity-mappings> |
| |
| |