| <?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://openjpa.apache.org/ns/orm/extendable" |
| xmlns:openjpa="http://openjpa.apache.org/ns/orm" |
| xmlns:orm="http://java.sun.com/xml/ns/persistence/orm" |
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| version="2.0"> |
| |
| <openjpa:openjpa-version version="1.0"/> |
| |
| <entity class="org.apache.openjpa.persistence.fetchgroups.FGEmployee"> |
| <inheritance strategy="SINGLE_TABLE"/> |
| <discriminator-value>0</discriminator-value> |
| <discriminator-column name="EMP_TYPE" discriminator-type="INTEGER"/> |
| <openjpa:entity> |
| <openjpa:fetch-groups> |
| <openjpa:fetch-group name="AddressFetchGroup"> |
| <openjpa:fetch-attribute name="address"/> |
| </openjpa:fetch-group> |
| <openjpa:fetch-group name="RatingFetchGroup"> |
| <openjpa:fetch-attribute name="rating"/> |
| </openjpa:fetch-group> |
| <openjpa:fetch-group name="ManagerFetchGroup1A"> |
| <openjpa:fetch-attribute name="manager"/> |
| </openjpa:fetch-group> |
| <openjpa:fetch-group name="ManagerFetchGroup1B"> |
| <openjpa:fetch-attribute name="manager"/> |
| </openjpa:fetch-group> |
| <openjpa:fetch-group name="ManagerFetchGroup2"> |
| <openjpa:fetch-attribute name="manager"/> |
| </openjpa:fetch-group> |
| <openjpa:fetch-group name="DescFetchGroup"> |
| <openjpa:fetch-attribute name="description"/> |
| </openjpa:fetch-group> |
| <openjpa:fetch-group name="DepartmentFetchGroup"> |
| <openjpa:fetch-attribute name="dept"/> |
| </openjpa:fetch-group> |
| <openjpa:fetch-group name="AggregateEmployeeFetchGroup1"> |
| <openjpa:fetch-attribute name="dept"/> |
| <openjpa:fetch-attribute name="address"/> |
| <openjpa:fetch-attribute name="manager" recursion-depth="1"/> |
| </openjpa:fetch-group> |
| <openjpa:fetch-group name="AggregateEmployeeFetchGroup1"> |
| <openjpa:referenced-fetch-group>DepartmentFetchGroup</openjpa:referenced-fetch-group> |
| </openjpa:fetch-group> |
| <openjpa:fetch-group name="AggregateEmployeeFetchGroup3"> |
| <openjpa:referenced-fetch-group>DepartmentFetchGroup</openjpa:referenced-fetch-group> |
| <openjpa:referenced-fetch-group>AddressFetchGroup</openjpa:referenced-fetch-group> |
| <openjpa:referenced-fetch-group>ManagerFetchGroup1A</openjpa:referenced-fetch-group> |
| </openjpa:fetch-group> |
| <openjpa:fetch-group name="AggregateEmployeeFetchGroup4"> |
| <openjpa:fetch-attribute name="dept"/> |
| <openjpa:fetch-attribute name="address"/> |
| <openjpa:referenced-fetch-group>ManagerFetchGroup1A</openjpa:referenced-fetch-group> |
| </openjpa:fetch-group> |
| </openjpa:fetch-groups> |
| </openjpa:entity> |
| </entity> |
| <entity class="org.apache.openjpa.persistence.fetchgroups.FGManager"> |
| <attributes> |
| <basic name="rating" fetch="LAZY"> |
| <openjpa:basic load-fetch-group="AddressFetchGroup"/> |
| </basic> |
| </attributes> |
| <openjpa:entity> |
| <openjpa:fetch-groups> |
| <openjpa:fetch-group name="MDataFetchGroup"> |
| <openjpa:fetch-attribute name="mData"/> |
| </openjpa:fetch-group> |
| <openjpa:fetch-group name="EmployeesFetchGroup"> |
| <openjpa:fetch-attribute name="employees"/> |
| </openjpa:fetch-group> |
| </openjpa:fetch-groups> |
| </openjpa:entity> |
| </entity> |
| |
| </entity-mappings> |