blob: 1dcb852316020346dca12a6e92df39fc470c60b4 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--
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.
-->
<!-- $Rev: 665986 $ $Date: 2008-06-10 09:05:30 +0300 (Tue, 10 Jun 2008) $ -->
<entity-mappings xmlns="http://java.sun.com/xml/ns/persistence/orm" version="1.0">
<entity name="onetomanyA" class="openejb.org.apache.openejb.deployment.entity.cmp.cmr.onetomany.onetomanyA">
<description>TestModule#A</description>
<table name="A"/>
<named-query name="onetomanyA.findByPrimaryKey(org.apache.openejb.deployment.entity.cmp.cmr.CompoundPK)">
<query>SELECT OBJECT(A) FROM onetomanyA A</query>
</named-query>
<attributes>
<id name="field1">
<column name="a1"/>
</id>
<basic name="field2">
<column name="a2"/>
</basic>
<one-to-many name="onetomanyB_a" mapped-by="a">
<cascade>
<cascade-all/>
</cascade>
</one-to-many>
</attributes>
</entity>
<entity name="onetomanyB" class="openejb.org.apache.openejb.deployment.entity.cmp.cmr.onetomany.onetomanyB">
<description>TestModule#B</description>
<table name="B"/>
<named-query name="onetomanyB.findByPrimaryKey(org.apache.openejb.deployment.entity.cmp.cmr.CompoundPK)">
<query>SELECT OBJECT(B) FROM onetomanyB B</query>
</named-query>
<attributes>
<id name="field1">
<column name="b1"/>
</id>
<basic name="field2">
<column name="b2"/>
</basic>
<basic name="field3">
<column name="fka1"/>
</basic>
<basic name="field4"/>
<many-to-one name="a">
<join-column referenced-column-name="a1" name="fka1"/>
</many-to-one>
</attributes>
</entity>
</entity-mappings>