You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by aa...@apache.org on 2006/07/18 04:20:10 UTC

svn commit: r422943 - in /incubator/cayenne/main/trunk/cayenne/cayenne-java/src/tests: java/org/apache/cayenne/project/ resources/upgrade/1.1/ resources/upgrade/1.2/

Author: aadamchik
Date: Mon Jul 17 19:20:09 2006
New Revision: 422943

URL: http://svn.apache.org/viewvc?rev=422943&view=rev
Log:
adding upgrade tests for 1.1 -> 2.0 upgrade

Added:
    incubator/cayenne/main/trunk/cayenne/cayenne-java/src/tests/resources/upgrade/1.1/
    incubator/cayenne/main/trunk/cayenne/cayenne-java/src/tests/resources/upgrade/1.1/cayenne.xml
    incubator/cayenne/main/trunk/cayenne/cayenne-java/src/tests/resources/upgrade/1.1/dataview0.view.xml
    incubator/cayenne/main/trunk/cayenne/cayenne-java/src/tests/resources/upgrade/1.1/dataview1.view.xml
    incubator/cayenne/main/trunk/cayenne/cayenne-java/src/tests/resources/upgrade/1.1/defaultNode.driver.xml
    incubator/cayenne/main/trunk/cayenne/cayenne-java/src/tests/resources/upgrade/1.1/locking.map.xml
    incubator/cayenne/main/trunk/cayenne/cayenne-java/src/tests/resources/upgrade/1.1/map-db1.map.xml
    incubator/cayenne/main/trunk/cayenne/cayenne-java/src/tests/resources/upgrade/1.1/map-db2.map.xml
    incubator/cayenne/main/trunk/cayenne/cayenne-java/src/tests/resources/upgrade/1.1/one-way-map.map.xml
    incubator/cayenne/main/trunk/cayenne/cayenne-java/src/tests/resources/upgrade/1.1/people.map.xml
    incubator/cayenne/main/trunk/cayenne/cayenne-java/src/tests/resources/upgrade/1.1/relationships.map.xml
    incubator/cayenne/main/trunk/cayenne/cayenne-java/src/tests/resources/upgrade/1.1/testmap.map.xml
Modified:
    incubator/cayenne/main/trunk/cayenne/cayenne-java/src/tests/java/org/apache/cayenne/project/ApplicationProjectUpgradeTst.java
    incubator/cayenne/main/trunk/cayenne/cayenne-java/src/tests/resources/upgrade/1.2/cayenne.xml

Modified: incubator/cayenne/main/trunk/cayenne/cayenne-java/src/tests/java/org/apache/cayenne/project/ApplicationProjectUpgradeTst.java
URL: http://svn.apache.org/viewvc/incubator/cayenne/main/trunk/cayenne/cayenne-java/src/tests/java/org/apache/cayenne/project/ApplicationProjectUpgradeTst.java?rev=422943&r1=422942&r2=422943&view=diff
==============================================================================
--- incubator/cayenne/main/trunk/cayenne/cayenne-java/src/tests/java/org/apache/cayenne/project/ApplicationProjectUpgradeTst.java (original)
+++ incubator/cayenne/main/trunk/cayenne/cayenne-java/src/tests/java/org/apache/cayenne/project/ApplicationProjectUpgradeTst.java Mon Jul 17 19:20:09 2006
@@ -76,6 +76,44 @@
 
 public class ApplicationProjectUpgradeTst extends CayenneTestCase {
 
+    public void testUpgradeFrom1_1() throws Exception {
+
+        // copy files first as upgrade is done in-place
+        File upgradeScratchDir = new File(getTestDir(), "upgrade/1.1");
+        upgradeScratchDir.mkdirs();
+
+        URL upgradeSrcUrl = CayenneTestResources.getResourceURL("upgrade/1.1");
+        File upgradeSrcDir = new File(new URI(upgradeSrcUrl.toExternalForm()));
+        File[] files = upgradeSrcDir.listFiles();
+        for (int i = 0; i < files.length; i++) {
+            Util.copy(files[i], new File(upgradeScratchDir, files[i].getName()));
+        }
+
+        File cayenneXml = new File(upgradeScratchDir, "cayenne.xml");
+        ApplicationProject p = new ApplicationProject(
+                cayenneXml,
+                buildProjectConfiguration(cayenneXml));
+
+        ApplicationUpgradeHandler handler = ApplicationUpgradeHandler.sharedHandler();
+        assertEquals(Project.UPGRADE_STATUS_OLD, handler.checkForUpgrades(p
+                .getConfiguration(), new ArrayList()));
+        handler.performUpgrade(p);
+
+        ApplicationProject p1 = new ApplicationProject(
+                cayenneXml,
+                buildProjectConfiguration(cayenneXml));
+        assertEquals(Project.UPGRADE_STATUS_CURRENT, handler.checkForUpgrades(p1
+                .getConfiguration(), new ArrayList()));
+
+        DataDomain dd = p1.getConfiguration().getDomain("default");
+        assertNotNull(dd);
+        DataNode dn = dd.getNode("defaultNode");
+        assertNotNull(dn);
+        assertNotNull(dn.getAdapter());
+        assertEquals(MySQLAdapter.class.getName(), dn.getAdapter().getClass().getName());
+        assertEquals(DriverDataSourceFactory.class.getName(), dn.getDataSourceFactory());
+    }
+    
     public void testUpgradeFrom1_2() throws Exception {
 
         // copy files first as upgrade is done in-place

Added: incubator/cayenne/main/trunk/cayenne/cayenne-java/src/tests/resources/upgrade/1.1/cayenne.xml
URL: http://svn.apache.org/viewvc/incubator/cayenne/main/trunk/cayenne/cayenne-java/src/tests/resources/upgrade/1.1/cayenne.xml?rev=422943&view=auto
==============================================================================
--- incubator/cayenne/main/trunk/cayenne/cayenne-java/src/tests/resources/upgrade/1.1/cayenne.xml (added)
+++ incubator/cayenne/main/trunk/cayenne/cayenne-java/src/tests/resources/upgrade/1.1/cayenne.xml Mon Jul 17 19:20:09 2006
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<domains project-version="1.1">
+<domain name="default">
+	<map name="one-way-map" location="one-way-map.map.xml"/>
+	<map name="map-db2" location="map-db2.map.xml"/>
+	<map name="locking" location="locking.map.xml"/>
+	<map name="testmap" location="testmap.map.xml"/>
+	<map name="map-db1" location="map-db1.map.xml"/>
+	<map name="people" location="people.map.xml"/>
+	<map name="relationships" location="relationships.map.xml"/>
+
+	<node name="defaultNode"
+		 datasource="defaultNode.driver.xml"
+		 adapter="org.objectstyle.cayenne.dba.mysql.MySQLAdapter"
+		 factory="org.objectstyle.cayenne.conf.DriverDataSourceFactory">
+			<map-ref name="one-way-map"/>
+			<map-ref name="map-db2"/>
+			<map-ref name="locking"/>
+			<map-ref name="map-db1"/>
+			<map-ref name="testmap"/>
+			<map-ref name="people"/>
+			<map-ref name="relationships"/>
+	 </node>
+</domain>
+<view name="dataview0" location="dataview0.view.xml"/>
+<view name="dataview1" location="dataview1.view.xml"/>
+</domains>

Added: incubator/cayenne/main/trunk/cayenne/cayenne-java/src/tests/resources/upgrade/1.1/dataview0.view.xml
URL: http://svn.apache.org/viewvc/incubator/cayenne/main/trunk/cayenne/cayenne-java/src/tests/resources/upgrade/1.1/dataview0.view.xml?rev=422943&view=auto
==============================================================================
--- incubator/cayenne/main/trunk/cayenne/cayenne-java/src/tests/resources/upgrade/1.1/dataview0.view.xml (added)
+++ incubator/cayenne/main/trunk/cayenne/cayenne-java/src/tests/resources/upgrade/1.1/dataview0.view.xml Mon Jul 17 19:20:09 2006
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<data-view>
+    <obj-entity-view name="ObjEntityView1" obj-entity-name="Artist">
+        <field name="field0" calc-type="nocalc" obj-attribute-name="artistName" editable="true" pref-index="0" data-type="String" visible="true" />
+        <field name="field1" calc-type="nocalc" obj-attribute-name="dateOfBirth" editable="true" pref-index="1" data-type="String" visible="true" />
+    </obj-entity-view>
+</data-view>
+

Added: incubator/cayenne/main/trunk/cayenne/cayenne-java/src/tests/resources/upgrade/1.1/dataview1.view.xml
URL: http://svn.apache.org/viewvc/incubator/cayenne/main/trunk/cayenne/cayenne-java/src/tests/resources/upgrade/1.1/dataview1.view.xml?rev=422943&view=auto
==============================================================================
--- incubator/cayenne/main/trunk/cayenne/cayenne-java/src/tests/resources/upgrade/1.1/dataview1.view.xml (added)
+++ incubator/cayenne/main/trunk/cayenne/cayenne-java/src/tests/resources/upgrade/1.1/dataview1.view.xml Mon Jul 17 19:20:09 2006
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<data-view>
+    <obj-entity-view name="ObjEntityView2" obj-entity-name="PaintingInfo">
+        <field name="field0" calc-type="nocalc" obj-attribute-name="textReview" editable="true" pref-index="0" data-type="String" visible="true" />
+    </obj-entity-view>
+</data-view>
+

Added: incubator/cayenne/main/trunk/cayenne/cayenne-java/src/tests/resources/upgrade/1.1/defaultNode.driver.xml
URL: http://svn.apache.org/viewvc/incubator/cayenne/main/trunk/cayenne/cayenne-java/src/tests/resources/upgrade/1.1/defaultNode.driver.xml?rev=422943&view=auto
==============================================================================
--- incubator/cayenne/main/trunk/cayenne/cayenne-java/src/tests/resources/upgrade/1.1/defaultNode.driver.xml (added)
+++ incubator/cayenne/main/trunk/cayenne/cayenne-java/src/tests/resources/upgrade/1.1/defaultNode.driver.xml Mon Jul 17 19:20:09 2006
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<driver project-version="1.1">
+	<connectionPool min="1" max="1" />
+</driver>

Added: incubator/cayenne/main/trunk/cayenne/cayenne-java/src/tests/resources/upgrade/1.1/locking.map.xml
URL: http://svn.apache.org/viewvc/incubator/cayenne/main/trunk/cayenne/cayenne-java/src/tests/resources/upgrade/1.1/locking.map.xml?rev=422943&view=auto
==============================================================================
--- incubator/cayenne/main/trunk/cayenne/cayenne-java/src/tests/resources/upgrade/1.1/locking.map.xml (added)
+++ incubator/cayenne/main/trunk/cayenne/cayenne-java/src/tests/resources/upgrade/1.1/locking.map.xml Mon Jul 17 19:20:09 2006
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="utf-8"?>
+<data-map project-version="1.1">
+	<db-entity name="DATE_LOCKING_TEST">
+		<db-attribute name="DATE_LOCK" type="DATE"/>
+		<db-attribute name="DATE_LOCKING_TEST_ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
+		<db-attribute name="NAME" type="VARCHAR" length="100"/>
+	</db-entity>
+	<db-entity name="LOCKING_HELPER">
+		<db-attribute name="LOCKING_HELPER_ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
+		<db-attribute name="NAME" type="VARCHAR" length="100"/>
+		<db-attribute name="REL_LOCKING_TEST_ID" type="INTEGER"/>
+	</db-entity>
+	<db-entity name="REL_LOCKING_TEST">
+		<db-attribute name="NAME" type="VARCHAR" length="100"/>
+		<db-attribute name="REL_LOCKING_TEST_ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
+		<db-attribute name="SIMPLE_LOCKING_TEST_ID" type="INTEGER"/>
+	</db-entity>
+	<db-entity name="SIMPLE_LOCKING_TEST">
+		<db-attribute name="DESCRIPTION" type="VARCHAR" length="200"/>
+		<db-attribute name="LOCKING_TEST_ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
+		<db-attribute name="NAME" type="VARCHAR" length="100"/>
+	</db-entity>
+	<db-entity name="TIME_LOCKING_TEST">
+		<db-attribute name="NAME" type="VARCHAR" length="100"/>
+		<db-attribute name="TIME_LOCK" type="TIMESTAMP"/>
+		<db-attribute name="TIME_LOCKING_TEST_ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
+	</db-entity>
+	<obj-entity name="DateLockingTest" className="org.objectstyle.cayenne.testdo.locking.DateLockingTest" lock-type="optimistic" dbEntityName="DATE_LOCKING_TEST">
+		<obj-attribute name="dateLock" type="java.util.Date" lock="true" db-attribute-path="DATE_LOCK"/>
+		<obj-attribute name="name" type="java.lang.String" db-attribute-path="NAME"/>
+	</obj-entity>
+	<obj-entity name="LockingHelper" className="org.objectstyle.cayenne.testdo.locking.LockingHelper" dbEntityName="LOCKING_HELPER">
+		<obj-attribute name="name" type="java.lang.String" db-attribute-path="NAME"/>
+	</obj-entity>
+	<obj-entity name="RelLockingTest" className="org.objectstyle.cayenne.testdo.locking.RelLockingTest" lock-type="optimistic" dbEntityName="REL_LOCKING_TEST">
+		<obj-attribute name="name" type="java.lang.String" db-attribute-path="NAME"/>
+	</obj-entity>
+	<obj-entity name="SimpleLockingTest" className="org.objectstyle.cayenne.testdo.locking.SimpleLockingTest" lock-type="optimistic" dbEntityName="SIMPLE_LOCKING_TEST">
+		<obj-attribute name="description" type="java.lang.String" db-attribute-path="DESCRIPTION"/>
+		<obj-attribute name="name" type="java.lang.String" lock="true" db-attribute-path="NAME"/>
+	</obj-entity>
+	<obj-entity name="TimeLockingTest" className="org.objectstyle.cayenne.testdo.locking.TimeLockingTest" lock-type="optimistic" dbEntityName="TIME_LOCKING_TEST">
+		<obj-attribute name="name" type="java.lang.String" db-attribute-path="NAME"/>
+		<obj-attribute name="timeLock" type="java.util.Date" lock="true" db-attribute-path="TIME_LOCK"/>
+	</obj-entity>
+	<db-relationship name="toRelLockingTest" source="LOCKING_HELPER" target="REL_LOCKING_TEST" toMany="false">
+		<db-attribute-pair source="REL_LOCKING_TEST_ID" target="REL_LOCKING_TEST_ID"/>
+	</db-relationship>
+	<db-relationship name="lockingHelpers" source="REL_LOCKING_TEST" target="LOCKING_HELPER" toMany="true">
+		<db-attribute-pair source="REL_LOCKING_TEST_ID" target="REL_LOCKING_TEST_ID"/>
+	</db-relationship>
+	<db-relationship name="toSimpleLockingTest" source="REL_LOCKING_TEST" target="SIMPLE_LOCKING_TEST" toMany="false">
+		<db-attribute-pair source="SIMPLE_LOCKING_TEST_ID" target="LOCKING_TEST_ID"/>
+	</db-relationship>
+	<db-relationship name="relaLockingTests" source="SIMPLE_LOCKING_TEST" target="REL_LOCKING_TEST" toMany="true">
+		<db-attribute-pair source="LOCKING_TEST_ID" target="SIMPLE_LOCKING_TEST_ID"/>
+	</db-relationship>
+	<obj-relationship name="toRelLockingTest" source="LockingHelper" target="RelLockingTest" db-relationship-path="toRelLockingTest"/>
+	<obj-relationship name="lockingHelpers" source="RelLockingTest" target="LockingHelper" lock="true" db-relationship-path="lockingHelpers"/>
+	<obj-relationship name="toSimpleLockingTest" source="RelLockingTest" target="SimpleLockingTest" lock="true" db-relationship-path="toSimpleLockingTest"/>
+</data-map>

Added: incubator/cayenne/main/trunk/cayenne/cayenne-java/src/tests/resources/upgrade/1.1/map-db1.map.xml
URL: http://svn.apache.org/viewvc/incubator/cayenne/main/trunk/cayenne/cayenne-java/src/tests/resources/upgrade/1.1/map-db1.map.xml?rev=422943&view=auto
==============================================================================
--- incubator/cayenne/main/trunk/cayenne/cayenne-java/src/tests/resources/upgrade/1.1/map-db1.map.xml (added)
+++ incubator/cayenne/main/trunk/cayenne/cayenne-java/src/tests/resources/upgrade/1.1/map-db1.map.xml Mon Jul 17 19:20:09 2006
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<data-map project-version="1.1">
+	<db-entity name="ARTIST">
+		<db-attribute name="ARTIST_ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
+		<db-attribute name="ARTIST_NAME" type="CHAR" isMandatory="true" length="254"/>
+		<db-attribute name="DATE_OF_BIRTH" type="DATE"/>
+	</db-entity>
+	<obj-entity name="Artist" className="org.objectstyle.art.Artist" dbEntityName="ARTIST">
+		<obj-attribute name="artistName" type="java.lang.String" db-attribute-path="ARTIST_NAME"/>
+		<obj-attribute name="dateOfBirth" type="java.util.Date" db-attribute-path="DATE_OF_BIRTH"/>
+	</obj-entity>
+</data-map>

Added: incubator/cayenne/main/trunk/cayenne/cayenne-java/src/tests/resources/upgrade/1.1/map-db2.map.xml
URL: http://svn.apache.org/viewvc/incubator/cayenne/main/trunk/cayenne/cayenne-java/src/tests/resources/upgrade/1.1/map-db2.map.xml?rev=422943&view=auto
==============================================================================
--- incubator/cayenne/main/trunk/cayenne/cayenne-java/src/tests/resources/upgrade/1.1/map-db2.map.xml (added)
+++ incubator/cayenne/main/trunk/cayenne/cayenne-java/src/tests/resources/upgrade/1.1/map-db2.map.xml Mon Jul 17 19:20:09 2006
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<data-map project-version="1.1">
+	<db-entity name="EXHIBIT">
+		<db-attribute name="CLOSING_DATE" type="TIMESTAMP" isMandatory="true"/>
+		<db-attribute name="EXHIBIT_ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
+		<db-attribute name="GALLERY_ID" type="INTEGER" isMandatory="true"/>
+		<db-attribute name="OPENING_DATE" type="TIMESTAMP" isMandatory="true"/>
+	</db-entity>
+	<db-entity name="GALLERY">
+		<db-attribute name="GALLERY_ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
+		<db-attribute name="GALLERY_NAME" type="VARCHAR" isMandatory="true" length="100"/>
+	</db-entity>
+	<obj-entity name="Exhibit" className="org.objectstyle.art.Exhibit" dbEntityName="EXHIBIT">
+		<obj-attribute name="closingDate" type="java.util.Date" db-attribute-path="CLOSING_DATE"/>
+		<obj-attribute name="openingDate" type="java.util.Date" db-attribute-path="OPENING_DATE"/>
+	</obj-entity>
+	<obj-entity name="Gallery" className="org.objectstyle.art.Gallery" dbEntityName="GALLERY">
+		<obj-attribute name="galleryName" type="java.lang.String" db-attribute-path="GALLERY_NAME"/>
+	</obj-entity>
+</data-map>

Added: incubator/cayenne/main/trunk/cayenne/cayenne-java/src/tests/resources/upgrade/1.1/one-way-map.map.xml
URL: http://svn.apache.org/viewvc/incubator/cayenne/main/trunk/cayenne/cayenne-java/src/tests/resources/upgrade/1.1/one-way-map.map.xml?rev=422943&view=auto
==============================================================================
--- incubator/cayenne/main/trunk/cayenne/cayenne-java/src/tests/resources/upgrade/1.1/one-way-map.map.xml (added)
+++ incubator/cayenne/main/trunk/cayenne/cayenne-java/src/tests/resources/upgrade/1.1/one-way-map.map.xml Mon Jul 17 19:20:09 2006
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="utf-8"?>
+<data-map project-version="1.1">
+	<property name="defaultPackage" value="org.objectstyle.art.oneway"/>
+	<db-entity name="ARTIST">
+		<db-attribute name="ARTIST_ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
+		<db-attribute name="ARTIST_NAME" type="CHAR" isMandatory="true" length="254"/>
+		<db-attribute name="DATE_OF_BIRTH" type="DATE"/>
+	</db-entity>
+	<db-entity name="GALLERY">
+		<db-attribute name="GALLERY_ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
+		<db-attribute name="GALLERY_NAME" type="VARCHAR" isMandatory="true" length="100"/>
+	</db-entity>
+	<db-entity name="PAINTING">
+		<db-attribute name="ARTIST_ID" type="INTEGER"/>
+		<db-attribute name="ESTIMATED_PRICE" type="DECIMAL" length="10" precision="2"/>
+		<db-attribute name="GALLERY_ID" type="INTEGER"/>
+		<db-attribute name="PAINTING_ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
+		<db-attribute name="PAINTING_TITLE" type="VARCHAR" isMandatory="true" length="255"/>
+	</db-entity>
+	<obj-entity name="Artist" className="org.objectstyle.art.oneway.Artist" dbEntityName="ARTIST">
+		<obj-attribute name="artistName" type="java.lang.String" db-attribute-path="ARTIST_NAME"/>
+		<obj-attribute name="dateOfBirth" type="java.util.Date" db-attribute-path="DATE_OF_BIRTH"/>
+	</obj-entity>
+	<obj-entity name="Gallery" className="org.objectstyle.art.oneway.Gallery" dbEntityName="GALLERY">
+		<obj-attribute name="galleryName" type="java.lang.String" db-attribute-path="GALLERY_NAME"/>
+	</obj-entity>
+	<obj-entity name="Painting" className="org.objectstyle.art.oneway.Painting" dbEntityName="PAINTING" superClassName="org.objectstyle.art.ArtDataObject">
+		<obj-attribute name="estimatedPrice" type="java.math.BigDecimal" db-attribute-path="ESTIMATED_PRICE"/>
+		<obj-attribute name="paintingTitle" type="java.lang.String" db-attribute-path="PAINTING_TITLE"/>
+	</obj-entity>
+	<db-relationship name="paintingArray" source="ARTIST" target="PAINTING" toMany="true">
+		<db-attribute-pair source="ARTIST_ID" target="ARTIST_ID"/>
+	</db-relationship>
+	<db-relationship name="toArtist" source="PAINTING" target="ARTIST" toMany="false">
+		<db-attribute-pair source="ARTIST_ID" target="ARTIST_ID"/>
+	</db-relationship>
+	<db-relationship name="toGallery" source="PAINTING" target="GALLERY" toMany="false">
+		<db-attribute-pair source="GALLERY_ID" target="GALLERY_ID"/>
+	</db-relationship>
+	<obj-relationship name="paintingArray" source="Artist" target="Painting" deleteRule="Cascade" db-relationship-path="paintingArray"/>
+	<obj-relationship name="toGallery" source="Painting" target="Gallery" deleteRule="Nullify" db-relationship-path="toGallery"/>
+</data-map>

Added: incubator/cayenne/main/trunk/cayenne/cayenne-java/src/tests/resources/upgrade/1.1/people.map.xml
URL: http://svn.apache.org/viewvc/incubator/cayenne/main/trunk/cayenne/cayenne-java/src/tests/resources/upgrade/1.1/people.map.xml?rev=422943&view=auto
==============================================================================
--- incubator/cayenne/main/trunk/cayenne/cayenne-java/src/tests/resources/upgrade/1.1/people.map.xml (added)
+++ incubator/cayenne/main/trunk/cayenne/cayenne-java/src/tests/resources/upgrade/1.1/people.map.xml Mon Jul 17 19:20:09 2006
@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="utf-8"?>
+<data-map project-version="1.1">
+	<property name="defaultPackage" value="org.objectstyle.cayenne.testdo.inherit"/>
+	<db-entity name="ADDRESS">
+		<db-attribute name="ADDRESS_ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
+		<db-attribute name="CITY" type="VARCHAR" length="100"/>
+		<db-attribute name="PERSON_ID" type="INTEGER" isMandatory="true"/>
+	</db-entity>
+	<db-entity name="CLIENT_COMPANY">
+		<db-attribute name="CLIENT_COMPANY_ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
+		<db-attribute name="NAME" type="VARCHAR" length="100"/>
+	</db-entity>
+	<db-entity name="DEPARTMENT">
+		<db-attribute name="DEPARTMENT_ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
+		<db-attribute name="MANAGER_ID" type="INTEGER"/>
+		<db-attribute name="NAME" type="VARCHAR" isMandatory="true" length="100"/>
+	</db-entity>
+	<db-entity name="PERSON">
+		<db-attribute name="CLIENT_COMPANY_ID" type="INTEGER"/>
+		<db-attribute name="CLIENT_CONTACT_TYPE" type="VARCHAR" length="50"/>
+		<db-attribute name="DEPARTMENT_ID" type="INTEGER"/>
+		<db-attribute name="NAME" type="VARCHAR" isMandatory="true" length="100"/>
+		<db-attribute name="PERSON_ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
+		<db-attribute name="PERSON_TYPE" type="CHAR" isMandatory="true" length="2"/>
+		<db-attribute name="SALARY" type="FLOAT"/>
+	</db-entity>
+	<obj-entity name="AbstractPerson" className="org.objectstyle.cayenne.testdo.inherit.AbstractPerson" dbEntityName="PERSON">
+		<obj-attribute name="name" type="java.lang.String" db-attribute-path="NAME"/>
+		<obj-attribute name="personType" type="java.lang.String" db-attribute-path="PERSON_TYPE"/>
+	</obj-entity>
+	<obj-entity name="Address" className="org.objectstyle.cayenne.testdo.inherit.Address" dbEntityName="ADDRESS">
+		<obj-attribute name="city" type="java.lang.String" db-attribute-path="CITY"/>
+	</obj-entity>
+	<obj-entity name="ClientCompany" className="org.objectstyle.cayenne.testdo.inherit.ClientCompany" dbEntityName="CLIENT_COMPANY">
+		<obj-attribute name="name" type="java.lang.String" db-attribute-path="NAME"/>
+	</obj-entity>
+	<obj-entity name="CustomerRepresentative" superEntityName="AbstractPerson" className="org.objectstyle.cayenne.testdo.inherit.CustomerRepresentative">
+		<qualifier><![CDATA[personType = "C"]]></qualifier>
+		<obj-attribute name="clientContactType" type="java.lang.String" db-attribute-path="CLIENT_CONTACT_TYPE"/>
+	</obj-entity>
+	<obj-entity name="Department" className="org.objectstyle.cayenne.testdo.inherit.Department" dbEntityName="DEPARTMENT">
+		<obj-attribute name="name" type="java.lang.String" db-attribute-path="NAME"/>
+	</obj-entity>
+	<obj-entity name="Employee" superEntityName="AbstractPerson" className="org.objectstyle.cayenne.testdo.inherit.Employee">
+		<qualifier><![CDATA[personType = "EE"]]></qualifier>
+		<obj-attribute name="salary" type="java.lang.Float" db-attribute-path="SALARY"/>
+	</obj-entity>
+	<obj-entity name="Manager" superEntityName="Employee" className="org.objectstyle.cayenne.testdo.inherit.Manager">
+		<qualifier><![CDATA[personType = "EM"]]></qualifier>
+	</obj-entity>
+	<db-relationship name="toPerson" source="ADDRESS" target="PERSON" toMany="false">
+		<db-attribute-pair source="PERSON_ID" target="PERSON_ID"/>
+	</db-relationship>
+	<db-relationship name="representatives" source="CLIENT_COMPANY" target="PERSON" toMany="true">
+		<db-attribute-pair source="CLIENT_COMPANY_ID" target="CLIENT_COMPANY_ID"/>
+	</db-relationship>
+	<db-relationship name="employees" source="DEPARTMENT" target="PERSON" toMany="true">
+		<db-attribute-pair source="DEPARTMENT_ID" target="DEPARTMENT_ID"/>
+	</db-relationship>
+	<db-relationship name="toManager" source="DEPARTMENT" target="PERSON" toMany="false">
+		<db-attribute-pair source="MANAGER_ID" target="PERSON_ID"/>
+	</db-relationship>
+	<db-relationship name="employeeAddresses" source="PERSON" target="ADDRESS" toMany="true">
+		<db-attribute-pair source="PERSON_ID" target="PERSON_ID"/>
+	</db-relationship>
+	<db-relationship name="managedDepartments" source="PERSON" target="DEPARTMENT" toMany="true">
+		<db-attribute-pair source="PERSON_ID" target="MANAGER_ID"/>
+	</db-relationship>
+	<db-relationship name="toClientCompany" source="PERSON" target="CLIENT_COMPANY" toMany="false">
+		<db-attribute-pair source="CLIENT_COMPANY_ID" target="CLIENT_COMPANY_ID"/>
+	</db-relationship>
+	<db-relationship name="toDepartment" source="PERSON" target="DEPARTMENT" toMany="false">
+		<db-attribute-pair source="DEPARTMENT_ID" target="DEPARTMENT_ID"/>
+	</db-relationship>
+	<obj-relationship name="toEmployee" source="Address" target="Employee" db-relationship-path="toPerson"/>
+	<obj-relationship name="representatives" source="ClientCompany" target="CustomerRepresentative" db-relationship-path="representatives"/>
+	<obj-relationship name="toClientCompany" source="CustomerRepresentative" target="ClientCompany" db-relationship-path="toClientCompany"/>
+	<obj-relationship name="employees" source="Department" target="Employee" db-relationship-path="employees"/>
+	<obj-relationship name="toManager" source="Department" target="Manager" db-relationship-path="employees"/>
+	<obj-relationship name="addresses" source="Employee" target="Address" db-relationship-path="employeeAddresses"/>
+	<obj-relationship name="toDepartment" source="Employee" target="Department" db-relationship-path="toDepartment"/>
+	<obj-relationship name="managedDepartments" source="Manager" target="Department" db-relationship-path="managedDepartments"/>
+</data-map>

Added: incubator/cayenne/main/trunk/cayenne/cayenne-java/src/tests/resources/upgrade/1.1/relationships.map.xml
URL: http://svn.apache.org/viewvc/incubator/cayenne/main/trunk/cayenne/cayenne-java/src/tests/resources/upgrade/1.1/relationships.map.xml?rev=422943&view=auto
==============================================================================
--- incubator/cayenne/main/trunk/cayenne/cayenne-java/src/tests/resources/upgrade/1.1/relationships.map.xml (added)
+++ incubator/cayenne/main/trunk/cayenne/cayenne-java/src/tests/resources/upgrade/1.1/relationships.map.xml Mon Jul 17 19:20:09 2006
@@ -0,0 +1,217 @@
+<?xml version="1.0" encoding="utf-8"?>
+<data-map project-version="1.1">
+	<property name="defaultPackage" value="org.objectstyle.cayenne.testdo.relationship"/>
+	<db-entity name="CLOB_DETAIL">
+		<db-attribute name="CLOB_DETAIL_ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
+		<db-attribute name="CLOB_MASTER_ID" type="INTEGER"/>
+		<db-attribute name="NAME" type="VARCHAR" length="254"/>
+	</db-entity>
+	<db-entity name="CLOB_MASTER">
+		<db-attribute name="CLOB_COLUMN" type="CLOB"/>
+		<db-attribute name="CLOB_MASTER_ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
+		<db-attribute name="NAME" type="VARCHAR" length="254"/>
+	</db-entity>
+	<db-entity name="COMPLEX_JOIN">
+		<db-attribute name="EXTRA_COLUMN" type="VARCHAR" length="50"/>
+		<db-attribute name="FT1_FK" type="INTEGER"/>
+		<db-attribute name="FT3_FK" type="INTEGER"/>
+		<db-attribute name="PK" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
+	</db-entity>
+	<db-entity name="DELETE_RULE_FLATA">
+		<db-attribute name="FLATA_ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
+	</db-entity>
+	<db-entity name="DELETE_RULE_FLATB">
+		<db-attribute name="FLATB_ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
+	</db-entity>
+	<db-entity name="DELETE_RULE_JOIN">
+		<db-attribute name="FLATA_ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
+		<db-attribute name="FLATB_ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
+	</db-entity>
+	<db-entity name="DELETE_RULE_TEST1">
+		<db-attribute name="DEL_RULE_TEST1_ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
+		<db-attribute name="TEST2_ID" type="INTEGER" isMandatory="true"/>
+	</db-entity>
+	<db-entity name="DELETE_RULE_TEST2">
+		<db-attribute name="DEL_RULE_TEST2_ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
+	</db-entity>
+	<db-entity name="DELETE_RULE_TEST3">
+		<db-attribute name="DELETE_RULE_TEST_3_FK" type="INTEGER"/>
+		<db-attribute name="DELETE_RULE_TEST_3_ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
+	</db-entity>
+	<db-entity name="FLATTENED_TEST_1">
+		<db-attribute name="FT1_ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
+		<db-attribute name="NAME" type="VARCHAR" isMandatory="true" length="100"/>
+	</db-entity>
+	<db-entity name="FLATTENED_TEST_2">
+		<db-attribute name="FT1_ID" type="INTEGER"/>
+		<db-attribute name="FT2_ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
+		<db-attribute name="NAME" type="VARCHAR" isMandatory="true" length="100"/>
+	</db-entity>
+	<db-entity name="FLATTENED_TEST_3">
+		<db-attribute name="FT2_ID" type="INTEGER"/>
+		<db-attribute name="FT3_ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
+		<db-attribute name="NAME" type="VARCHAR" isMandatory="true" length="100"/>
+	</db-entity>
+	<db-entity name="MEANINGFUL_FK">
+		<db-attribute name="MEANIGNFUL_FK_ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
+		<db-attribute name="RELATIONSHIP_HELPER_ID" type="INTEGER" isMandatory="true"/>
+	</db-entity>
+	<db-entity name="REFLEXIVE_AND_TO_ONE">
+		<db-attribute name="NAME" type="VARCHAR" length="100"/>
+		<db-attribute name="PARENT_ID" type="INTEGER"/>
+		<db-attribute name="REFLEXIVE_AND_TO_ONE_ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
+		<db-attribute name="RELATIONSHIP_HELPER_ID" type="INTEGER"/>
+	</db-entity>
+	<db-entity name="RELATIONSHIP_HELPER">
+		<db-attribute name="NAME" type="VARCHAR" length="100"/>
+		<db-attribute name="RELATIONSHIP_HELPER_ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
+	</db-entity>
+	<db-entity name="TO_ONEFK1">
+		<db-attribute name="TO_ONEFK1_FK" type="INTEGER" isMandatory="true"/>
+		<db-attribute name="TO_ONEFK1_PK" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
+	</db-entity>
+	<db-entity name="TO_ONEFK2">
+		<db-attribute name="TO_ONEFK2_PK" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
+	</db-entity>
+	<obj-entity name="ClobDetail" className="org.objectstyle.cayenne.testdo.relationship.ClobDetail" dbEntityName="CLOB_DETAIL">
+		<obj-attribute name="name" type="java.lang.String" db-attribute-path="NAME"/>
+	</obj-entity>
+	<obj-entity name="ClobMaster" className="org.objectstyle.cayenne.testdo.relationship.ClobMaster" dbEntityName="CLOB_MASTER">
+		<obj-attribute name="clobColumn" type="java.lang.String" db-attribute-path="CLOB_COLUMN"/>
+		<obj-attribute name="name" type="java.lang.String" db-attribute-path="NAME"/>
+	</obj-entity>
+	<obj-entity name="DeleteRuleFlatA" className="org.objectstyle.cayenne.testdo.relationship.DeleteRuleFlatA" dbEntityName="DELETE_RULE_FLATA">
+	</obj-entity>
+	<obj-entity name="DeleteRuleFlatB" className="org.objectstyle.cayenne.testdo.relationship.DeleteRuleFlatB" dbEntityName="DELETE_RULE_FLATB">
+	</obj-entity>
+	<obj-entity name="DeleteRuleTest1" className="org.objectstyle.cayenne.testdo.relationship.DeleteRuleTest1" dbEntityName="DELETE_RULE_TEST1">
+	</obj-entity>
+	<obj-entity name="DeleteRuleTest2" className="org.objectstyle.cayenne.testdo.relationship.DeleteRuleTest2" dbEntityName="DELETE_RULE_TEST2">
+	</obj-entity>
+	<obj-entity name="DeleteRuleTest3" className="org.objectstyle.cayenne.testdo.relationship.DeleteRuleTest3" dbEntityName="DELETE_RULE_TEST3">
+	</obj-entity>
+	<obj-entity name="FlattenedTest1" className="org.objectstyle.cayenne.testdo.relationship.FlattenedTest1" dbEntityName="FLATTENED_TEST_1">
+		<obj-attribute name="name" type="java.lang.String" db-attribute-path="NAME"/>
+	</obj-entity>
+	<obj-entity name="FlattenedTest2" className="org.objectstyle.cayenne.testdo.relationship.FlattenedTest2" dbEntityName="FLATTENED_TEST_2">
+		<obj-attribute name="name" type="java.lang.String" db-attribute-path="NAME"/>
+	</obj-entity>
+	<obj-entity name="FlattenedTest3" className="org.objectstyle.cayenne.testdo.relationship.FlattenedTest3" dbEntityName="FLATTENED_TEST_3">
+		<obj-attribute name="name" type="java.lang.String" db-attribute-path="NAME"/>
+	</obj-entity>
+	<obj-entity name="MeaningfulFK" className="org.objectstyle.cayenne.testdo.relationship.MeaningfulFK" dbEntityName="MEANINGFUL_FK">
+		<obj-attribute name="relationshipHelperID" type="java.lang.Integer" db-attribute-path="RELATIONSHIP_HELPER_ID"/>
+	</obj-entity>
+	<obj-entity name="ReflexiveAndToOne" className="org.objectstyle.cayenne.testdo.relationship.ReflexiveAndToOne" dbEntityName="REFLEXIVE_AND_TO_ONE">
+		<obj-attribute name="name" type="java.lang.String" db-attribute-path="NAME"/>
+	</obj-entity>
+	<obj-entity name="RelationshipHelper" className="org.objectstyle.cayenne.testdo.relationship.RelationshipHelper" dbEntityName="RELATIONSHIP_HELPER">
+		<obj-attribute name="name" type="java.lang.String" db-attribute-path="NAME"/>
+	</obj-entity>
+	<obj-entity name="ToOneFK1" className="org.objectstyle.cayenne.testdo.relationship.ToOneFK1" dbEntityName="TO_ONEFK1">
+	</obj-entity>
+	<obj-entity name="ToOneFK2" className="org.objectstyle.cayenne.testdo.relationship.ToOneFK2" dbEntityName="TO_ONEFK2">
+	</obj-entity>
+	<db-relationship name="master" source="CLOB_DETAIL" target="CLOB_MASTER" toMany="false">
+		<db-attribute-pair source="CLOB_MASTER_ID" target="CLOB_MASTER_ID"/>
+	</db-relationship>
+	<db-relationship name="details" source="CLOB_MASTER" target="CLOB_DETAIL" toMany="true">
+		<db-attribute-pair source="CLOB_MASTER_ID" target="CLOB_MASTER_ID"/>
+	</db-relationship>
+	<db-relationship name="toFT1" source="COMPLEX_JOIN" target="FLATTENED_TEST_1" toMany="false">
+		<db-attribute-pair source="FT1_FK" target="FT1_ID"/>
+	</db-relationship>
+	<db-relationship name="toFT3" source="COMPLEX_JOIN" target="FLATTENED_TEST_3" toMany="false">
+		<db-attribute-pair source="FT3_FK" target="FT3_ID"/>
+	</db-relationship>
+	<db-relationship name="joins" source="DELETE_RULE_FLATA" target="DELETE_RULE_JOIN" toDependentPK="true" toMany="true">
+		<db-attribute-pair source="FLATA_ID" target="FLATA_ID"/>
+	</db-relationship>
+	<db-relationship name="joins" source="DELETE_RULE_FLATB" target="DELETE_RULE_JOIN" toDependentPK="true" toMany="true">
+		<db-attribute-pair source="FLATB_ID" target="FLATB_ID"/>
+	</db-relationship>
+	<db-relationship name="toFlatA" source="DELETE_RULE_JOIN" target="DELETE_RULE_FLATA" toMany="false">
+		<db-attribute-pair source="FLATA_ID" target="FLATA_ID"/>
+	</db-relationship>
+	<db-relationship name="toFlatB" source="DELETE_RULE_JOIN" target="DELETE_RULE_FLATB" toMany="false">
+		<db-attribute-pair source="FLATB_ID" target="FLATB_ID"/>
+	</db-relationship>
+	<db-relationship name="deleteRuleTest3Array" source="DELETE_RULE_TEST1" target="DELETE_RULE_TEST3" toMany="true">
+		<db-attribute-pair source="DEL_RULE_TEST1_ID" target="DELETE_RULE_TEST_3_FK"/>
+	</db-relationship>
+	<db-relationship name="test2" source="DELETE_RULE_TEST1" target="DELETE_RULE_TEST2" toMany="false">
+		<db-attribute-pair source="TEST2_ID" target="DEL_RULE_TEST2_ID"/>
+	</db-relationship>
+	<db-relationship name="deleteRuleTest3Array" source="DELETE_RULE_TEST2" target="DELETE_RULE_TEST3" toMany="true">
+		<db-attribute-pair source="DEL_RULE_TEST2_ID" target="DELETE_RULE_TEST_3_FK"/>
+	</db-relationship>
+	<db-relationship name="test1Array" source="DELETE_RULE_TEST2" target="DELETE_RULE_TEST1" toMany="true">
+		<db-attribute-pair source="DEL_RULE_TEST2_ID" target="TEST2_ID"/>
+	</db-relationship>
+	<db-relationship name="toDeleteRuleTest2" source="DELETE_RULE_TEST3" target="DELETE_RULE_TEST2" toMany="false">
+		<db-attribute-pair source="DELETE_RULE_TEST_3_FK" target="DEL_RULE_TEST2_ID"/>
+	</db-relationship>
+	<db-relationship name="complexJoins" source="FLATTENED_TEST_1" target="COMPLEX_JOIN" toMany="true">
+		<db-attribute-pair source="FT1_ID" target="FT1_FK"/>
+	</db-relationship>
+	<db-relationship name="ft2Array" source="FLATTENED_TEST_1" target="FLATTENED_TEST_2" toMany="true">
+		<db-attribute-pair source="FT1_ID" target="FT1_ID"/>
+	</db-relationship>
+	<db-relationship name="ft3Array" source="FLATTENED_TEST_2" target="FLATTENED_TEST_3" toMany="true">
+		<db-attribute-pair source="FT2_ID" target="FT2_ID"/>
+	</db-relationship>
+	<db-relationship name="toFT1" source="FLATTENED_TEST_2" target="FLATTENED_TEST_1" toMany="false">
+		<db-attribute-pair source="FT1_ID" target="FT1_ID"/>
+	</db-relationship>
+	<db-relationship name="complexJoins" source="FLATTENED_TEST_3" target="COMPLEX_JOIN" toMany="true">
+		<db-attribute-pair source="FT3_ID" target="FT3_FK"/>
+	</db-relationship>
+	<db-relationship name="toFT2" source="FLATTENED_TEST_3" target="FLATTENED_TEST_2" toMany="false">
+		<db-attribute-pair source="FT2_ID" target="FT2_ID"/>
+	</db-relationship>
+	<db-relationship name="toRelationshipHelper" source="MEANINGFUL_FK" target="RELATIONSHIP_HELPER" toMany="false">
+		<db-attribute-pair source="RELATIONSHIP_HELPER_ID" target="RELATIONSHIP_HELPER_ID"/>
+	</db-relationship>
+	<db-relationship name="children" source="REFLEXIVE_AND_TO_ONE" target="REFLEXIVE_AND_TO_ONE" toMany="true">
+		<db-attribute-pair source="REFLEXIVE_AND_TO_ONE_ID" target="PARENT_ID"/>
+	</db-relationship>
+	<db-relationship name="toHelper" source="REFLEXIVE_AND_TO_ONE" target="RELATIONSHIP_HELPER" toMany="false">
+		<db-attribute-pair source="RELATIONSHIP_HELPER_ID" target="RELATIONSHIP_HELPER_ID"/>
+	</db-relationship>
+	<db-relationship name="toParent" source="REFLEXIVE_AND_TO_ONE" target="REFLEXIVE_AND_TO_ONE" toMany="false">
+		<db-attribute-pair source="PARENT_ID" target="REFLEXIVE_AND_TO_ONE_ID"/>
+	</db-relationship>
+	<db-relationship name="meanigfulFKs" source="RELATIONSHIP_HELPER" target="MEANINGFUL_FK" toMany="true">
+		<db-attribute-pair source="RELATIONSHIP_HELPER_ID" target="RELATIONSHIP_HELPER_ID"/>
+	</db-relationship>
+	<db-relationship name="reflexiveAndToOneArray" source="RELATIONSHIP_HELPER" target="REFLEXIVE_AND_TO_ONE" toMany="true">
+		<db-attribute-pair source="RELATIONSHIP_HELPER_ID" target="RELATIONSHIP_HELPER_ID"/>
+	</db-relationship>
+	<db-relationship name="toPK" source="TO_ONEFK1" target="TO_ONEFK2" toMany="false">
+		<db-attribute-pair source="TO_ONEFK1_FK" target="TO_ONEFK2_PK"/>
+	</db-relationship>
+	<db-relationship name="toOneToFK" source="TO_ONEFK2" target="TO_ONEFK1" toMany="false">
+		<db-attribute-pair source="TO_ONEFK2_PK" target="TO_ONEFK1_FK"/>
+	</db-relationship>
+	<obj-relationship name="master" source="ClobDetail" target="ClobMaster" db-relationship-path="master"/>
+	<obj-relationship name="details" source="ClobMaster" target="ClobDetail" db-relationship-path="details"/>
+	<obj-relationship name="flatB" source="DeleteRuleFlatA" target="DeleteRuleFlatB" db-relationship-path="joins.toFlatB"/>
+	<obj-relationship name="untitledRel" source="DeleteRuleFlatB" target="DeleteRuleFlatA" db-relationship-path="joins.toFlatA"/>
+	<obj-relationship name="test2" source="DeleteRuleTest1" target="DeleteRuleTest2" deleteRule="Deny" db-relationship-path="test2"/>
+	<obj-relationship name="deleteRuleTest3Array" source="DeleteRuleTest2" target="DeleteRuleTest3" db-relationship-path="deleteRuleTest3Array"/>
+	<obj-relationship name="test1Array" source="DeleteRuleTest2" target="DeleteRuleTest1" deleteRule="Nullify" db-relationship-path="test1Array"/>
+	<obj-relationship name="toDeleteRuleTest2" source="DeleteRuleTest3" target="DeleteRuleTest2" db-relationship-path="toDeleteRuleTest2"/>
+	<obj-relationship name="ft2Array" source="FlattenedTest1" target="FlattenedTest2" db-relationship-path="ft2Array"/>
+	<obj-relationship name="ft3Array" source="FlattenedTest1" target="FlattenedTest3" db-relationship-path="ft2Array.ft3Array"/>
+	<obj-relationship name="ft3OverComplex" source="FlattenedTest1" target="FlattenedTest3" db-relationship-path="complexJoins.toFT3"/>
+	<obj-relationship name="ft3Array" source="FlattenedTest2" target="FlattenedTest3" db-relationship-path="ft3Array"/>
+	<obj-relationship name="toFT1" source="FlattenedTest2" target="FlattenedTest1" db-relationship-path="toFT1"/>
+	<obj-relationship name="toFT1" source="FlattenedTest3" target="FlattenedTest1" db-relationship-path="toFT2.toFT1"/>
+	<obj-relationship name="toFT2" source="FlattenedTest3" target="FlattenedTest2" db-relationship-path="toFT2"/>
+	<obj-relationship name="toRelationshipHelper" source="MeaningfulFK" target="RelationshipHelper" db-relationship-path="toRelationshipHelper"/>
+	<obj-relationship name="children" source="ReflexiveAndToOne" target="ReflexiveAndToOne" db-relationship-path="children"/>
+	<obj-relationship name="toHelper" source="ReflexiveAndToOne" target="RelationshipHelper" db-relationship-path="toHelper"/>
+	<obj-relationship name="toParent" source="ReflexiveAndToOne" target="ReflexiveAndToOne" db-relationship-path="toParent"/>
+	<obj-relationship name="toPK" source="ToOneFK1" target="ToOneFK2" db-relationship-path="toPK"/>
+	<obj-relationship name="toOneToFK" source="ToOneFK2" target="ToOneFK1" db-relationship-path="toOneToFK"/>
+</data-map>

Added: incubator/cayenne/main/trunk/cayenne/cayenne-java/src/tests/resources/upgrade/1.1/testmap.map.xml
URL: http://svn.apache.org/viewvc/incubator/cayenne/main/trunk/cayenne/cayenne-java/src/tests/resources/upgrade/1.1/testmap.map.xml?rev=422943&view=auto
==============================================================================
--- incubator/cayenne/main/trunk/cayenne/cayenne-java/src/tests/resources/upgrade/1.1/testmap.map.xml (added)
+++ incubator/cayenne/main/trunk/cayenne/cayenne-java/src/tests/resources/upgrade/1.1/testmap.map.xml Mon Jul 17 19:20:09 2006
@@ -0,0 +1,411 @@
+<?xml version="1.0" encoding="utf-8"?>
+<data-map project-version="1.1">
+	<procedure name="cayenne_tst_out_proc">
+		<procedure-parameter name="in_param" type="INTEGER" direction="in"/>
+		<procedure-parameter name="out_param" type="INTEGER" direction="out"/>
+	</procedure>
+	<procedure name="cayenne_tst_select_proc">
+		<procedure-parameter name="aName" type="VARCHAR" length="254" direction="in"/>
+		<procedure-parameter name="paintingPrice" type="INTEGER" direction="in"/>
+	</procedure>
+	<procedure name="cayenne_tst_upd_proc">
+		<procedure-parameter name="paintingPrice" type="INTEGER" direction="in"/>
+	</procedure>
+	<db-entity name="ARTGROUP">
+		<db-attribute name="GROUP_ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
+		<db-attribute name="NAME" type="VARCHAR" isMandatory="true" length="100"/>
+		<db-attribute name="PARENT_GROUP_ID" type="INTEGER"/>
+	</db-entity>
+	<db-entity name="ARTIST">
+		<db-attribute name="ARTIST_ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
+		<db-attribute name="ARTIST_NAME" type="CHAR" isMandatory="true" length="254"/>
+		<db-attribute name="DATE_OF_BIRTH" type="DATE"/>
+	</db-entity>
+	<db-entity name="ARTIST_EXHIBIT">
+		<db-attribute name="ARTIST_ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
+		<db-attribute name="EXHIBIT_ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
+	</db-entity>
+	<db-entity name="ARTIST_GROUP">
+		<db-attribute name="ARTIST_ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
+		<db-attribute name="GROUP_ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
+	</db-entity>
+	<db-entity name="BINARY_PK_TEST1">
+		<db-attribute name="BIN_ID" type="VARBINARY" isPrimaryKey="true" isMandatory="true" length="32"/>
+		<db-attribute name="NAME" type="VARCHAR" length="10"/>
+	</db-entity>
+	<db-entity name="BINARY_PK_TEST2">
+		<db-attribute name="DETAIL_NAME" type="VARCHAR" length="10"/>
+		<db-attribute name="FK_ID" type="VARBINARY" length="32"/>
+		<db-attribute name="ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
+	</db-entity>
+	<db-entity name="BIT_TEST">
+		<db-attribute name="BIT_COLUMN" type="BIT" isMandatory="true"/>
+		<db-attribute name="ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
+	</db-entity>
+	<db-entity name="BLOB_TEST">
+		<db-attribute name="BLOB_COL" type="BLOB"/>
+		<db-attribute name="BLOB_TEST_ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
+	</db-entity>
+	<db-entity name="CHAR_FK_TEST">
+		<db-attribute name="FK_COL" type="CHAR" length="10"/>
+		<db-attribute name="NAME" type="VARCHAR" length="100"/>
+		<db-attribute name="PK" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
+	</db-entity>
+	<db-entity name="CHAR_PK_TEST">
+		<db-attribute name="OTHER_COL" type="CHAR" length="10"/>
+		<db-attribute name="PK_COL" type="CHAR" isPrimaryKey="true" isMandatory="true" length="10"/>
+	</db-entity>
+	<db-entity name="CLOB_TEST">
+		<db-attribute name="CLOB_COL" type="CLOB"/>
+		<db-attribute name="CLOB_TEST_ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
+	</db-entity>
+	<db-entity name="COMPOUND_FK_TEST">
+		<db-attribute name="F_KEY1" type="VARCHAR" length="20"/>
+		<db-attribute name="F_KEY2" type="VARCHAR" length="20"/>
+		<db-attribute name="NAME" type="VARCHAR" length="255"/>
+		<db-attribute name="PKEY" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
+	</db-entity>
+	<db-entity name="COMPOUND_PK_TEST">
+		<db-attribute name="KEY1" type="VARCHAR" isPrimaryKey="true" isMandatory="true" length="20"/>
+		<db-attribute name="KEY2" type="VARCHAR" isPrimaryKey="true" isMandatory="true" length="20"/>
+		<db-attribute name="NAME" type="VARCHAR" length="255"/>
+	</db-entity>
+	<db-entity name="DATE_TEST">
+		<db-attribute name="DATE_COLUMN" type="DATE"/>
+		<db-attribute name="DATE_TEST_ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
+		<db-attribute name="TIMESTAMP_COLUMN" type="TIMESTAMP"/>
+		<db-attribute name="TIME_COLUMN" type="TIME"/>
+	</db-entity>
+	<db-entity name="DECIMAL_PK_TST">
+		<db-attribute name="DECIMAL_PK" type="DECIMAL" isPrimaryKey="true" isMandatory="true"/>
+		<db-attribute name="NAME" type="VARCHAR" length="100"/>
+	</db-entity>
+	<db-entity name="EXHIBIT">
+		<db-attribute name="CLOSING_DATE" type="TIMESTAMP" isMandatory="true"/>
+		<db-attribute name="EXHIBIT_ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
+		<db-attribute name="GALLERY_ID" type="INTEGER" isMandatory="true"/>
+		<db-attribute name="OPENING_DATE" type="TIMESTAMP" isMandatory="true"/>
+	</db-entity>
+	<db-entity name="FLOAT_TEST">
+		<db-attribute name="FLOAT_COL" type="FLOAT"/>
+		<db-attribute name="ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
+	</db-entity>
+	<db-entity name="GALLERY">
+		<db-attribute name="GALLERY_ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
+		<db-attribute name="GALLERY_NAME" type="VARCHAR" isMandatory="true" length="100"/>
+	</db-entity>
+	<db-entity name="MEANINGFUL_PK_DEP">
+		<db-attribute name="DESCR" type="VARCHAR" length="50"/>
+		<db-attribute name="MASTER_PK" type="INTEGER"/>
+		<db-attribute name="PK_ATTRIBUTE" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
+	</db-entity>
+	<db-entity name="MEANINGFUL_PK_TEST1">
+		<db-attribute name="DESCR" type="VARCHAR" length="50"/>
+		<db-attribute name="PK_ATTRIBUTE" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
+	</db-entity>
+	<db-entity name="NO_PK_TEST">
+		<db-attribute name="ATTRIBUTE1" type="INTEGER"/>
+	</db-entity>
+	<db-entity name="PAINTING">
+		<db-attribute name="ARTIST_ID" type="INTEGER"/>
+		<db-attribute name="ESTIMATED_PRICE" type="DECIMAL" length="10" precision="2"/>
+		<db-attribute name="GALLERY_ID" type="INTEGER"/>
+		<db-attribute name="PAINTING_ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
+		<db-attribute name="PAINTING_TITLE" type="VARCHAR" isMandatory="true" length="255"/>
+	</db-entity>
+	<db-entity name="PAINTING1">
+		<db-attribute name="ARTIST_ID" type="INTEGER"/>
+		<db-attribute name="ESTIMATED_PRICE" type="DECIMAL" length="10" precision="2"/>
+		<db-attribute name="GALLERY_ID" type="INTEGER"/>
+		<db-attribute name="PAINTING_ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
+		<db-attribute name="PAINTING_TITLE" type="VARCHAR" isMandatory="true" length="255"/>
+	</db-entity>
+	<db-entity name="PAINTING_INFO">
+		<db-attribute name="IMAGE_BLOB" type="LONGVARBINARY"/>
+		<db-attribute name="PAINTING_ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
+		<db-attribute name="TEXT_REVIEW" type="LONGVARCHAR"/>
+	</db-entity>
+	<db-entity name="SMALLINT_TEST">
+		<db-attribute name="ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
+		<db-attribute name="SMALLINT_COL" type="SMALLINT"/>
+	</db-entity>
+	<db-entity name="TINYINT_TEST">
+		<db-attribute name="ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
+		<db-attribute name="TINYINT_COL" type="TINYINT"/>
+	</db-entity>
+	<db-entity name="ARTIST_ASSETS" parentName="PAINTING">
+		<db-attribute-derived name="ARTIST_ID" type="INTEGER" isPrimaryKey="true" isGroupBy="true" spec="%@">
+			<db-attribute-ref name="ARTIST_ID"/>
+		</db-attribute-derived>
+		<db-attribute-derived name="ESTIMATED_PRICE" type="DECIMAL" length="10" precision="2" spec="SUM(%@)">
+			<db-attribute-ref name="ESTIMATED_PRICE"/>
+		</db-attribute-derived>
+		<db-attribute-derived name="PAINTINGS_COUNT" type="INTEGER" length="10" precision="2" spec="COUNT(%@)">
+			<db-attribute-ref name="PAINTING_ID"/>
+		</db-attribute-derived>
+	</db-entity>
+	<obj-entity name="ArtGroup" className="org.objectstyle.art.ArtGroup" dbEntityName="ARTGROUP">
+		<obj-attribute name="name" type="java.lang.String" db-attribute-path="NAME"/>
+	</obj-entity>
+	<obj-entity name="Artist" className="org.objectstyle.art.Artist" dbEntityName="ARTIST">
+		<obj-attribute name="artistName" type="java.lang.String" db-attribute-path="ARTIST_NAME"/>
+		<obj-attribute name="dateOfBirth" type="java.util.Date" db-attribute-path="DATE_OF_BIRTH"/>
+	</obj-entity>
+	<obj-entity name="ArtistAssets" className="org.objectstyle.art.ArtistAssets" dbEntityName="ARTIST_ASSETS">
+		<obj-attribute name="estimatedPrice" type="java.math.BigDecimal" db-attribute-path="ESTIMATED_PRICE"/>
+		<obj-attribute name="paintingsCount" type="java.lang.Integer" db-attribute-path="PAINTINGS_COUNT"/>
+	</obj-entity>
+	<obj-entity name="ArtistExhibit" className="org.objectstyle.art.ArtistExhibit" dbEntityName="ARTIST_EXHIBIT">
+	</obj-entity>
+	<obj-entity name="ArtistPaintingCounts" className="org.objectstyle.art.ArtistPaintingCounts" dbEntityName="ARTIST_ASSETS">
+		<obj-attribute name="paintingsCount" type="java.lang.Integer" db-attribute-path="PAINTINGS_COUNT"/>
+	</obj-entity>
+	<obj-entity name="BinaryPKTest1" className="org.objectstyle.art.BinaryPKTest1" dbEntityName="BINARY_PK_TEST1">
+		<obj-attribute name="name" type="java.lang.String" db-attribute-path="NAME"/>
+	</obj-entity>
+	<obj-entity name="BinaryPKTest2" className="org.objectstyle.art.BinaryPKTest2" dbEntityName="BINARY_PK_TEST2">
+		<obj-attribute name="detailName" type="java.lang.String" db-attribute-path="DETAIL_NAME"/>
+	</obj-entity>
+	<obj-entity name="BitNumberTest" className="org.objectstyle.art.BitNumberTest" dbEntityName="BIT_TEST">
+		<obj-attribute name="bitColumn" type="java.lang.Integer" db-attribute-path="BIT_COLUMN"/>
+	</obj-entity>
+	<obj-entity name="BitTest" className="org.objectstyle.art.BitTest" dbEntityName="BIT_TEST">
+		<obj-attribute name="bitColumn" type="java.lang.Boolean" db-attribute-path="BIT_COLUMN"/>
+	</obj-entity>
+	<obj-entity name="BlobTest" className="org.objectstyle.art.BlobTest" dbEntityName="BLOB_TEST">
+		<obj-attribute name="blobCol" type="byte[]" db-attribute-path="BLOB_COL"/>
+	</obj-entity>
+	<obj-entity name="CharFkTest" className="org.objectstyle.art.CharFkTest" dbEntityName="CHAR_FK_TEST">
+		<obj-attribute name="name" type="java.lang.String" db-attribute-path="NAME"/>
+	</obj-entity>
+	<obj-entity name="CharPkTest" className="org.objectstyle.art.CharPkTest" dbEntityName="CHAR_PK_TEST">
+		<obj-attribute name="otherCol" type="java.lang.String" db-attribute-path="OTHER_COL"/>
+		<obj-attribute name="pkCol" type="java.lang.String" db-attribute-path="PK_COL"/>
+	</obj-entity>
+	<obj-entity name="ClobTest" className="org.objectstyle.art.ClobTest" dbEntityName="CLOB_TEST">
+		<obj-attribute name="clobCol" type="java.lang.String" db-attribute-path="CLOB_COL"/>
+	</obj-entity>
+	<obj-entity name="CompoundFkTest" className="org.objectstyle.art.CompoundFkTest" dbEntityName="COMPOUND_FK_TEST">
+		<obj-attribute name="name" type="java.lang.String" db-attribute-path="NAME"/>
+	</obj-entity>
+	<obj-entity name="CompoundPainting" className="org.objectstyle.art.CompoundPainting" readOnly="true" dbEntityName="PAINTING">
+		<obj-attribute name="artistName" type="java.lang.String" db-attribute-path="toArtist.ARTIST_NAME"/>
+		<obj-attribute name="estimatedPrice" type="java.math.BigDecimal" db-attribute-path="ESTIMATED_PRICE"/>
+		<obj-attribute name="galleryName" type="java.lang.String" db-attribute-path="toGallery.GALLERY_NAME"/>
+		<obj-attribute name="paintingTitle" type="java.lang.String" db-attribute-path="PAINTING_TITLE"/>
+		<obj-attribute name="textReview" type="java.lang.String" db-attribute-path="toPaintingInfo.TEXT_REVIEW"/>
+	</obj-entity>
+	<obj-entity name="CompoundPkTest" className="org.objectstyle.art.CompoundPkTest" dbEntityName="COMPOUND_PK_TEST">
+		<obj-attribute name="key1" type="java.lang.String" db-attribute-path="KEY1"/>
+		<obj-attribute name="key2" type="java.lang.String" db-attribute-path="KEY2"/>
+		<obj-attribute name="name" type="java.lang.String" db-attribute-path="NAME"/>
+	</obj-entity>
+	<obj-entity name="DateTest" className="org.objectstyle.art.DateTest" dbEntityName="DATE_TEST">
+		<obj-attribute name="dateColumn" type="java.util.Date" db-attribute-path="DATE_COLUMN"/>
+		<obj-attribute name="timeColumn" type="java.util.Date" db-attribute-path="TIME_COLUMN"/>
+		<obj-attribute name="timestampColumn" type="java.util.Date" db-attribute-path="TIMESTAMP_COLUMN"/>
+	</obj-entity>
+	<obj-entity name="DecimalPKTest" className="org.objectstyle.art.DecimalPKTest" dbEntityName="DECIMAL_PK_TST">
+		<obj-attribute name="decimalPK" type="java.math.BigDecimal" db-attribute-path="DECIMAL_PK"/>
+		<obj-attribute name="name" type="java.lang.String" db-attribute-path="NAME"/>
+	</obj-entity>
+	<obj-entity name="DecimalPkTest1" className="org.objectstyle.art.DecimalPKTest1" dbEntityName="DECIMAL_PK_TST">
+		<obj-attribute name="decimalPK" type="java.lang.Double" db-attribute-path="DECIMAL_PK"/>
+		<obj-attribute name="name" type="java.lang.String" db-attribute-path="NAME"/>
+	</obj-entity>
+	<obj-entity name="Exhibit" className="org.objectstyle.art.Exhibit" dbEntityName="EXHIBIT">
+		<obj-attribute name="closingDate" type="java.util.Date" db-attribute-path="CLOSING_DATE"/>
+		<obj-attribute name="openingDate" type="java.util.Date" db-attribute-path="OPENING_DATE"/>
+	</obj-entity>
+	<obj-entity name="Gallery" className="org.objectstyle.art.Gallery" dbEntityName="GALLERY">
+		<obj-attribute name="galleryName" type="java.lang.String" db-attribute-path="GALLERY_NAME"/>
+	</obj-entity>
+	<obj-entity name="MeaningfulPKDep" className="org.objectstyle.art.MeaningfulPKDep" dbEntityName="MEANINGFUL_PK_DEP">
+		<obj-attribute name="descr" type="java.lang.String" db-attribute-path="DESCR"/>
+	</obj-entity>
+	<obj-entity name="MeaningfulPKTest1" className="org.objectstyle.art.MeaningfulPKTest1" dbEntityName="MEANINGFUL_PK_TEST1">
+		<obj-attribute name="descr" type="java.lang.String" db-attribute-path="DESCR"/>
+		<obj-attribute name="pkAttribute" type="java.lang.Integer" db-attribute-path="PK_ATTRIBUTE"/>
+	</obj-entity>
+	<obj-entity name="NoPkTest" className="org.objectstyle.art.NoPkTest" dbEntityName="NO_PK_TEST">
+		<obj-attribute name="attribute1" type="java.lang.Integer" db-attribute-path="ATTRIBUTE1"/>
+	</obj-entity>
+	<obj-entity name="Painting" className="org.objectstyle.art.Painting" dbEntityName="PAINTING" superClassName="org.objectstyle.art.ArtDataObject">
+		<obj-attribute name="estimatedPrice" type="java.math.BigDecimal" db-attribute-path="ESTIMATED_PRICE"/>
+		<obj-attribute name="paintingTitle" type="java.lang.String" db-attribute-path="PAINTING_TITLE"/>
+	</obj-entity>
+	<obj-entity name="Painting1" className="org.objectstyle.art.Painting1" dbEntityName="PAINTING1">
+		<obj-attribute name="estimatedPrice" type="java.math.BigDecimal" db-attribute-path="ESTIMATED_PRICE"/>
+		<obj-attribute name="paintingTitle" type="java.lang.String" db-attribute-path="PAINTING_TITLE"/>
+	</obj-entity>
+	<obj-entity name="PaintingInfo" className="org.objectstyle.art.PaintingInfo" dbEntityName="PAINTING_INFO">
+		<obj-attribute name="imageBlob" type="byte[]" db-attribute-path="IMAGE_BLOB"/>
+		<obj-attribute name="textReview" type="java.lang.String" db-attribute-path="TEXT_REVIEW"/>
+	</obj-entity>
+	<obj-entity name="ROArtist" className="org.objectstyle.art.ROArtist" readOnly="true" dbEntityName="ARTIST">
+		<obj-attribute name="artistName" type="java.lang.String" db-attribute-path="ARTIST_NAME"/>
+		<obj-attribute name="dateOfBirth" type="java.sql.Date" db-attribute-path="DATE_OF_BIRTH"/>
+	</obj-entity>
+	<obj-entity name="ROPainting" className="org.objectstyle.art.ROPainting" readOnly="true" dbEntityName="PAINTING">
+		<obj-attribute name="estimatedPrice" type="java.math.BigDecimal" db-attribute-path="ESTIMATED_PRICE"/>
+		<obj-attribute name="paintingTitle" type="java.lang.String" db-attribute-path="PAINTING_TITLE"/>
+	</obj-entity>
+	<obj-entity name="RWCompoundPainting" className="org.objectstyle.art.RWCompoundPainting" dbEntityName="PAINTING">
+		<obj-attribute name="estimatedPrice" type="java.math.BigDecimal" db-attribute-path="ESTIMATED_PRICE"/>
+		<obj-attribute name="paintingTitle" type="java.lang.String" db-attribute-path="PAINTING_TITLE"/>
+		<obj-attribute name="textReview" type="java.lang.String" db-attribute-path="toPaintingInfo.TEXT_REVIEW"/>
+	</obj-entity>
+	<obj-entity name="SmallintTest" className="org.objectstyle.art.SmallintTest" dbEntityName="SMALLINT_TEST">
+		<obj-attribute name="smallintCol" type="java.lang.Short" db-attribute-path="SMALLINT_COL"/>
+	</obj-entity>
+	<obj-entity name="SubPainting" className="org.objectstyle.art.SubPainting" dbEntityName="PAINTING">
+		<obj-attribute name="paintingTitle" type="java.lang.String" db-attribute-path="PAINTING_TITLE"/>
+	</obj-entity>
+	<obj-entity name="TinyintTest" className="org.objectstyle.art.TinyintTest" dbEntityName="TINYINT_TEST">
+		<obj-attribute name="tinyintCol" type="java.lang.Byte" db-attribute-path="TINYINT_COL"/>
+	</obj-entity>
+	<db-relationship name="artistGroupArray" source="ARTGROUP" target="ARTIST_GROUP" toMany="true">
+		<db-attribute-pair source="GROUP_ID" target="GROUP_ID"/>
+	</db-relationship>
+	<db-relationship name="toChildGroups" source="ARTGROUP" target="ARTGROUP" toMany="true">
+		<db-attribute-pair source="GROUP_ID" target="PARENT_GROUP_ID"/>
+	</db-relationship>
+	<db-relationship name="toParentGroup" source="ARTGROUP" target="ARTGROUP" toMany="false">
+		<db-attribute-pair source="PARENT_GROUP_ID" target="GROUP_ID"/>
+	</db-relationship>
+	<db-relationship name="artistExhibitArray" source="ARTIST" target="ARTIST_EXHIBIT" toDependentPK="true" toMany="true">
+		<db-attribute-pair source="ARTIST_ID" target="ARTIST_ID"/>
+	</db-relationship>
+	<db-relationship name="artistGroupArray" source="ARTIST" target="ARTIST_GROUP" toMany="true">
+		<db-attribute-pair source="ARTIST_ID" target="ARTIST_ID"/>
+	</db-relationship>
+	<db-relationship name="paintingArray" source="ARTIST" target="PAINTING" toMany="true">
+		<db-attribute-pair source="ARTIST_ID" target="ARTIST_ID"/>
+	</db-relationship>
+	<db-relationship name="toArtist" source="ARTIST_ASSETS" target="ARTIST" toMany="false">
+		<db-attribute-pair source="ARTIST_ID" target="ARTIST_ID"/>
+	</db-relationship>
+	<db-relationship name="toArtist" source="ARTIST_EXHIBIT" target="ARTIST" toMany="false">
+		<db-attribute-pair source="ARTIST_ID" target="ARTIST_ID"/>
+	</db-relationship>
+	<db-relationship name="toExhibit" source="ARTIST_EXHIBIT" target="EXHIBIT" toMany="false">
+		<db-attribute-pair source="EXHIBIT_ID" target="EXHIBIT_ID"/>
+	</db-relationship>
+	<db-relationship name="toArtist" source="ARTIST_GROUP" target="ARTIST" toMany="false">
+		<db-attribute-pair source="ARTIST_ID" target="ARTIST_ID"/>
+	</db-relationship>
+	<db-relationship name="toGroup" source="ARTIST_GROUP" target="ARTGROUP" toMany="false">
+		<db-attribute-pair source="GROUP_ID" target="GROUP_ID"/>
+	</db-relationship>
+	<db-relationship name="binaryPKDetails" source="BINARY_PK_TEST1" target="BINARY_PK_TEST2" toMany="true">
+		<db-attribute-pair source="BIN_ID" target="FK_ID"/>
+	</db-relationship>
+	<db-relationship name="toBinaryPKMaster" source="BINARY_PK_TEST2" target="BINARY_PK_TEST1" toMany="false">
+		<db-attribute-pair source="FK_ID" target="BIN_ID"/>
+	</db-relationship>
+	<db-relationship name="toCharPK" source="CHAR_FK_TEST" target="CHAR_PK_TEST" toMany="false">
+		<db-attribute-pair source="FK_COL" target="PK_COL"/>
+	</db-relationship>
+	<db-relationship name="charFKs" source="CHAR_PK_TEST" target="CHAR_FK_TEST" toMany="true">
+		<db-attribute-pair source="PK_COL" target="FK_COL"/>
+	</db-relationship>
+	<db-relationship name="toCompoundPk" source="COMPOUND_FK_TEST" target="COMPOUND_PK_TEST" toMany="false">
+		<db-attribute-pair source="F_KEY1" target="KEY1"/>
+		<db-attribute-pair source="F_KEY2" target="KEY2"/>
+	</db-relationship>
+	<db-relationship name="compoundFkArray" source="COMPOUND_PK_TEST" target="COMPOUND_FK_TEST" toMany="true">
+		<db-attribute-pair source="KEY1" target="F_KEY1"/>
+		<db-attribute-pair source="KEY2" target="F_KEY2"/>
+	</db-relationship>
+	<db-relationship name="artistExhibitArray" source="EXHIBIT" target="ARTIST_EXHIBIT" toDependentPK="true" toMany="true">
+		<db-attribute-pair source="EXHIBIT_ID" target="EXHIBIT_ID"/>
+	</db-relationship>
+	<db-relationship name="toGallery" source="EXHIBIT" target="GALLERY" toMany="false">
+		<db-attribute-pair source="GALLERY_ID" target="GALLERY_ID"/>
+	</db-relationship>
+	<db-relationship name="exhibitArray" source="GALLERY" target="EXHIBIT" toMany="true">
+		<db-attribute-pair source="GALLERY_ID" target="GALLERY_ID"/>
+	</db-relationship>
+	<db-relationship name="paintingArray" source="GALLERY" target="PAINTING" toMany="true">
+		<db-attribute-pair source="GALLERY_ID" target="GALLERY_ID"/>
+	</db-relationship>
+	<db-relationship name="toMeaningfulPK" source="MEANINGFUL_PK_DEP" target="MEANINGFUL_PK_TEST1" toMany="false">
+		<db-attribute-pair source="MASTER_PK" target="PK_ATTRIBUTE"/>
+	</db-relationship>
+	<db-relationship name="meaningfulPKDepArray" source="MEANINGFUL_PK_TEST1" target="MEANINGFUL_PK_DEP" toMany="true">
+		<db-attribute-pair source="PK_ATTRIBUTE" target="MASTER_PK"/>
+	</db-relationship>
+	<db-relationship name="toArtist" source="PAINTING" target="ARTIST" toMany="false">
+		<db-attribute-pair source="ARTIST_ID" target="ARTIST_ID"/>
+	</db-relationship>
+	<db-relationship name="toGallery" source="PAINTING" target="GALLERY" toMany="false">
+		<db-attribute-pair source="GALLERY_ID" target="GALLERY_ID"/>
+	</db-relationship>
+	<db-relationship name="toPaintingInfo" source="PAINTING" target="PAINTING_INFO" toDependentPK="true" toMany="false">
+		<db-attribute-pair source="PAINTING_ID" target="PAINTING_ID"/>
+	</db-relationship>
+	<db-relationship name="toArtist" source="PAINTING1" target="ARTIST" toMany="false">
+		<db-attribute-pair source="ARTIST_ID" target="ARTIST_ID"/>
+	</db-relationship>
+	<db-relationship name="painting" source="PAINTING_INFO" target="PAINTING" toMany="false">
+		<db-attribute-pair source="PAINTING_ID" target="PAINTING_ID"/>
+	</db-relationship>
+	<obj-relationship name="artistArray" source="ArtGroup" target="Artist" deleteRule="Nullify" db-relationship-path="artistGroupArray.toArtist"/>
+	<obj-relationship name="childGroupsArray" source="ArtGroup" target="ArtGroup" deleteRule="Nullify" db-relationship-path="toChildGroups"/>
+	<obj-relationship name="toParentGroup" source="ArtGroup" target="ArtGroup" deleteRule="Nullify" db-relationship-path="toParentGroup"/>
+	<obj-relationship name="artistExhibitArray" source="Artist" target="ArtistExhibit" deleteRule="Cascade" db-relationship-path="artistExhibitArray"/>
+	<obj-relationship name="groupArray" source="Artist" target="ArtGroup" deleteRule="Cascade" db-relationship-path="artistGroupArray.toGroup"/>
+	<obj-relationship name="paintingArray" source="Artist" target="Painting" deleteRule="Cascade" db-relationship-path="paintingArray"/>
+	<obj-relationship name="toArtist" source="ArtistAssets" target="Artist" deleteRule="Deny" db-relationship-path="toArtist"/>
+	<obj-relationship name="toArtist" source="ArtistExhibit" target="Artist" deleteRule="Nullify" db-relationship-path="toArtist"/>
+	<obj-relationship name="toExhibit" source="ArtistExhibit" target="Exhibit" deleteRule="Nullify" db-relationship-path="toExhibit"/>
+	<obj-relationship name="binaryPKDetails" source="BinaryPKTest1" target="BinaryPKTest2" db-relationship-path="binaryPKDetails"/>
+	<obj-relationship name="toBinaryPKMaster" source="BinaryPKTest2" target="BinaryPKTest1" db-relationship-path="toBinaryPKMaster"/>
+	<obj-relationship name="toCharPK" source="CharFkTest" target="CharPkTest" db-relationship-path="toCharPK"/>
+	<obj-relationship name="charFKs" source="CharPkTest" target="CharFkTest" db-relationship-path="charFKs"/>
+	<obj-relationship name="toCompoundPk" source="CompoundFkTest" target="CompoundPkTest" db-relationship-path="toCompoundPk"/>
+	<obj-relationship name="toArtist" source="CompoundPainting" target="Artist" deleteRule="Nullify" db-relationship-path="toArtist"/>
+	<obj-relationship name="toGallery" source="CompoundPainting" target="Gallery" deleteRule="Nullify" db-relationship-path="toGallery"/>
+	<obj-relationship name="toPaintingInfo" source="CompoundPainting" target="PaintingInfo" deleteRule="Cascade" db-relationship-path="toPaintingInfo"/>
+	<obj-relationship name="compoundFkArray" source="CompoundPkTest" target="CompoundFkTest" db-relationship-path="compoundFkArray"/>
+	<obj-relationship name="artistExhibitArray" source="Exhibit" target="ArtistExhibit" deleteRule="Cascade" db-relationship-path="artistExhibitArray"/>
+	<obj-relationship name="toGallery" source="Exhibit" target="Gallery" deleteRule="Nullify" db-relationship-path="toGallery"/>
+	<obj-relationship name="exhibitArray" source="Gallery" target="Exhibit" deleteRule="Cascade" db-relationship-path="exhibitArray"/>
+	<obj-relationship name="paintingArray" source="Gallery" target="Painting" deleteRule="Deny" db-relationship-path="paintingArray"/>
+	<obj-relationship name="toMeaningfulPK" source="MeaningfulPKDep" target="MeaningfulPKTest1" db-relationship-path="toMeaningfulPK"/>
+	<obj-relationship name="meaningfulPKDepArray" source="MeaningfulPKTest1" target="MeaningfulPKDep" db-relationship-path="meaningfulPKDepArray"/>
+	<obj-relationship name="toArtist" source="Painting" target="Artist" deleteRule="Nullify" db-relationship-path="toArtist"/>
+	<obj-relationship name="toGallery" source="Painting" target="Gallery" deleteRule="Nullify" db-relationship-path="toGallery"/>
+	<obj-relationship name="toPaintingInfo" source="Painting" target="PaintingInfo" deleteRule="Cascade" db-relationship-path="toPaintingInfo"/>
+	<obj-relationship name="toArtist" source="Painting1" target="Artist" deleteRule="Nullify" db-relationship-path="toArtist"/>
+	<obj-relationship name="painting" source="PaintingInfo" target="Painting" deleteRule="Nullify" db-relationship-path="painting"/>
+	<obj-relationship name="paintingArray" source="ROArtist" target="Painting" deleteRule="Deny" db-relationship-path="paintingArray"/>
+	<obj-relationship name="toArtist" source="ROPainting" target="Artist" deleteRule="Nullify" db-relationship-path="toArtist"/>
+	<query name="NonSelectingQuery" factory="org.objectstyle.cayenne.map.SQLTemplateBuilder" root="data-map" root-name="testmap" selecting="false">
+		<sql><![CDATA[INSERT INTO PAINTING (PAINTING_ID, PAINTING_TITLE, ESTIMATED_PRICE)
+VALUES (512, 'No Painting Like This', 12.5)]]></sql>
+		<sql adapter-class="org.objectstyle.cayenne.dba.db2.DB2Adapter"><![CDATA[INSERT INTO PAINTING (PAINTING_ID, PAINTING_TITLE, ESTIMATED_PRICE) VALUES (512, 'No Painting Like This', 12.5)]]></sql>
+	</query>
+	<query name="ObjectQuery" factory="org.objectstyle.cayenne.map.SelectQueryBuilder" root="obj-entity" root-name="Painting">
+		<property name="cayenne.GenericSelectQuery.refreshingObjects" value="false"/>
+		<qualifier><![CDATA[toArtist = $artist]]></qualifier>
+		<ordering><![CDATA[paintingTitle]]></ordering>
+	</query>
+	<query name="ParameterizedNonSelectingQuery" factory="org.objectstyle.cayenne.map.SQLTemplateBuilder" root="data-map" root-name="testmap" selecting="false">
+		<sql><![CDATA[INSERT INTO PAINTING (PAINTING_ID, PAINTING_TITLE, ESTIMATED_PRICE)
+VALUES (#bind($id), #bind($title), #bind($price))]]></sql>
+		<sql adapter-class="org.objectstyle.cayenne.dba.db2.DB2Adapter"><![CDATA[INSERT INTO PAINTING (PAINTING_ID, PAINTING_TITLE, ESTIMATED_PRICE) values (#bind($id), #bind($title), #bind($price))]]></sql>
+	</query>
+	<query name="ProcedureQuery" factory="org.objectstyle.cayenne.map.ProcedureQueryBuilder" root="procedure" root-name="cayenne_tst_select_proc" result-type="org.objectstyle.art.Artist">
+	</query>
+	<query name="QueryWithOrdering" factory="org.objectstyle.cayenne.map.SelectQueryBuilder" root="obj-entity" root-name="Artist">
+		<ordering descending="true" ignore-case="true"><![CDATA[artistName]]></ordering>
+		<ordering><![CDATA[dateOfBirth]]></ordering>
+	</query>
+	<query name="QueryWithPrefetch" factory="org.objectstyle.cayenne.map.SelectQueryBuilder" root="obj-entity" root-name="Gallery">
+		<prefetch>paintingArray</prefetch>
+	</query>
+	<query name="QueryWithQualifier" factory="org.objectstyle.cayenne.map.SelectQueryBuilder" root="obj-entity" root-name="Artist">
+		<qualifier><![CDATA[artistName = $param1]]></qualifier>
+	</query>
+</data-map>

Modified: incubator/cayenne/main/trunk/cayenne/cayenne-java/src/tests/resources/upgrade/1.2/cayenne.xml
URL: http://svn.apache.org/viewvc/incubator/cayenne/main/trunk/cayenne/cayenne-java/src/tests/resources/upgrade/1.2/cayenne.xml?rev=422943&r1=422942&r2=422943&view=diff
==============================================================================
--- incubator/cayenne/main/trunk/cayenne/cayenne-java/src/tests/resources/upgrade/1.2/cayenne.xml (original)
+++ incubator/cayenne/main/trunk/cayenne/cayenne-java/src/tests/resources/upgrade/1.2/cayenne.xml Mon Jul 17 19:20:09 2006
@@ -1,30 +1,31 @@
 <?xml version="1.0" encoding="utf-8"?>
 <domains project-version="1.1">
-	<domain name="default">
-		<map name="generic" location="generic.map.xml" />
-		<map name="locking" location="locking.map.xml" />
-		<map name="map-db1" location="map-db1.map.xml" />
-		<map name="map-db2" location="map-db2.map.xml" />
-		<map name="multi-tier" location="multi-tier.map.xml" />
-		<map name="one-way-map" location="one-way-map.map.xml" />
-		<map name="people" location="people.map.xml" />
-		<map name="relationships" location="relationships.map.xml" />
-		<map name="testmap" location="testmap.map.xml" />
+<domain name="default">
+	<map name="generic" location="generic.map.xml"/>
+	<map name="locking" location="locking.map.xml"/>
+	<map name="map-db1" location="map-db1.map.xml"/>
+	<map name="map-db2" location="map-db2.map.xml"/>
+	<map name="multi-tier" location="multi-tier.map.xml"/>
+	<map name="one-way-map" location="one-way-map.map.xml"/>
+	<map name="people" location="people.map.xml"/>
+	<map name="relationships" location="relationships.map.xml"/>
+	<map name="testmap" location="testmap.map.xml"/>
 
-		<node name="defaultNode" datasource="defaultNode.driver.xml"
-			adapter="org.objectstyle.cayenne.dba.mysql.MySQLAdapter"
-			factory="org.objectstyle.cayenne.conf.DriverDataSourceFactory">
-			<map-ref name="generic" />
-			<map-ref name="one-way-map" />
-			<map-ref name="map-db2" />
-			<map-ref name="multi-tier" />
-			<map-ref name="locking" />
-			<map-ref name="map-db1" />
-			<map-ref name="testmap" />
-			<map-ref name="people" />
-			<map-ref name="relationships" />
-		</node>
-	</domain>
-	<view name="dataview0" location="dataview0.view.xml" />
-	<view name="dataview1" location="dataview1.view.xml" />
+	<node name="defaultNode"
+		 datasource="defaultNode.driver.xml"
+		 adapter="org.objectstyle.cayenne.dba.mysql.MySQLAdapter"
+		 factory="org.objectstyle.cayenne.conf.DriverDataSourceFactory">
+			<map-ref name="generic"/>
+			<map-ref name="one-way-map"/>
+			<map-ref name="map-db2"/>
+			<map-ref name="multi-tier"/>
+			<map-ref name="locking"/>
+			<map-ref name="testmap"/>
+			<map-ref name="map-db1"/>
+			<map-ref name="people"/>
+			<map-ref name="relationships"/>
+	 </node>
+</domain>
+<view name="dataview0" location="dataview0.view.xml"/>
+<view name="dataview1" location="dataview1.view.xml"/>
 </domains>