cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r568117 [2/2] - in /cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src: main/dtd/ main/java/org/apache/cayenne/ main/java/org/apache/cayenne/access/ main/java/org/apache/cayenne/map/ main/java/org/apache/cayenne/project/ main/java/...
Date Tue, 21 Aug 2007 13:26:49 GMT
Added: cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/java/org/apache/cayenne/CDOCollectionRelationshipTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/java/org/apache/cayenne/CDOCollectionRelationshipTest.java?rev=568117&view=auto
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/java/org/apache/cayenne/CDOCollectionRelationshipTest.java (added)
+++ cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/java/org/apache/cayenne/CDOCollectionRelationshipTest.java Tue Aug 21 06:26:38 2007
@@ -0,0 +1,175 @@
+/*****************************************************************
+ *   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.
+ ****************************************************************/
+package org.apache.cayenne;
+
+import java.util.Collection;
+
+import org.apache.cayenne.exp.ExpressionFactory;
+import org.apache.cayenne.query.RefreshQuery;
+import org.apache.cayenne.query.SelectQuery;
+import org.apache.cayenne.testdo.relationship.CollectionToMany;
+import org.apache.cayenne.testdo.relationship.CollectionToManyTarget;
+import org.apache.cayenne.unit.RelationshipCase;
+
+public class CDOCollectionRelationshipTest extends RelationshipCase {
+
+    protected void setUp() throws Exception {
+        deleteTestData();
+    }
+
+    public void testReadToMany() throws Exception {
+        createTestData("prepare");
+
+        CollectionToMany o1 = (CollectionToMany) DataObjectUtils.objectForPK(
+                createDataContext(),
+                CollectionToMany.class,
+                1);
+
+        Collection targets = o1.getTargets();
+
+        assertNotNull(targets);
+        assertTrue(((ValueHolder) targets).isFault());
+
+        assertEquals(3, targets.size());
+
+        assertTrue(targets.contains(DataObjectUtils.objectForPK(
+                o1.getObjectContext(),
+                CollectionToManyTarget.class,
+                1)));
+        assertTrue(targets.contains(DataObjectUtils.objectForPK(
+                o1.getObjectContext(),
+                CollectionToManyTarget.class,
+                2)));
+        assertTrue(targets.contains(DataObjectUtils.objectForPK(
+                o1.getObjectContext(),
+                CollectionToManyTarget.class,
+                3)));
+    }
+
+    public void testReadToManyPrefetching() throws Exception {
+        createTestData("prepare");
+
+        SelectQuery query = new SelectQuery(CollectionToMany.class, ExpressionFactory
+                .matchDbExp(CollectionToMany.ID_PK_COLUMN, new Integer(1)));
+        query.addPrefetch(CollectionToMany.TARGETS_PROPERTY);
+        CollectionToMany o1 = (CollectionToMany) DataObjectUtils.objectForQuery(
+                createDataContext(),
+                query);
+
+        Collection targets = o1.getTargets();
+
+        assertFalse(((ValueHolder) targets).isFault());
+
+        assertNotNull(targets);
+        assertEquals(3, targets.size());
+
+        assertTrue(targets.contains(DataObjectUtils.objectForPK(
+                o1.getObjectContext(),
+                CollectionToManyTarget.class,
+                1)));
+        assertTrue(targets.contains(DataObjectUtils.objectForPK(
+                o1.getObjectContext(),
+                CollectionToManyTarget.class,
+                2)));
+        assertTrue(targets.contains(DataObjectUtils.objectForPK(
+                o1.getObjectContext(),
+                CollectionToManyTarget.class,
+                3)));
+    }
+
+    public void testAddToMany() throws Exception {
+        createTestData("prepare");
+
+        CollectionToMany o1 = (CollectionToMany) DataObjectUtils.objectForPK(
+                createDataContext(),
+                CollectionToMany.class,
+                1);
+
+        Collection targets = o1.getTargets();
+        assertNotNull(targets);
+        assertEquals(3, targets.size());
+
+        CollectionToManyTarget newTarget = (CollectionToManyTarget) o1
+                .getObjectContext()
+                .newObject(CollectionToManyTarget.class);
+
+        o1.addToTargets(newTarget);
+        assertEquals(4, targets.size());
+        assertTrue(o1.getTargets().contains(newTarget));
+        assertSame(o1, newTarget.getCollectionToMany());
+
+        o1.getObjectContext().commitChanges();
+
+        o1.getObjectContext().performGenericQuery(new RefreshQuery());
+        assertEquals(4, o1.getTargets().size());
+    }
+
+    public void testRemoveToMany() throws Exception {
+        createTestData("prepare");
+
+        CollectionToMany o1 = (CollectionToMany) DataObjectUtils.objectForPK(
+                createDataContext(),
+                CollectionToMany.class,
+                1);
+
+        Collection targets = o1.getTargets();
+        assertEquals(3, targets.size());
+
+        CollectionToManyTarget target = (CollectionToManyTarget) DataObjectUtils
+                .objectForPK(o1.getObjectContext(), CollectionToManyTarget.class, 2);
+        o1.removeFromTargets(target);
+
+        assertEquals(2, targets.size());
+        assertFalse(o1.getTargets().contains(target));
+        assertNull(target.getCollectionToMany());
+
+        o1.getObjectContext().commitChanges();
+
+        o1.getObjectContext().performGenericQuery(new RefreshQuery());
+        assertEquals(2, o1.getTargets().size());
+        assertFalse(o1.getTargets().contains(target));
+    }
+
+    public void testAddToManyViaReverse() throws Exception {
+        createTestData("prepare");
+
+        CollectionToMany o1 = (CollectionToMany) DataObjectUtils.objectForPK(
+                createDataContext(),
+                CollectionToMany.class,
+                1);
+
+        Collection targets = o1.getTargets();
+        assertNotNull(targets);
+        assertEquals(3, targets.size());
+
+        CollectionToManyTarget newTarget = (CollectionToManyTarget) o1
+                .getObjectContext()
+                .newObject(CollectionToManyTarget.class);
+
+        newTarget.setCollectionToMany(o1);
+        assertEquals(4, targets.size());
+        assertTrue(o1.getTargets().contains(newTarget));
+        assertSame(o1, newTarget.getCollectionToMany());
+
+        o1.getObjectContext().commitChanges();
+
+        o1.getObjectContext().performGenericQuery(new RefreshQuery());
+        assertEquals(4, o1.getTargets().size());
+    }
+}

Added: cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/java/org/apache/cayenne/CDOMapRelationshipTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/java/org/apache/cayenne/CDOMapRelationshipTest.java?rev=568117&view=auto
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/java/org/apache/cayenne/CDOMapRelationshipTest.java (added)
+++ cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/java/org/apache/cayenne/CDOMapRelationshipTest.java Tue Aug 21 06:26:38 2007
@@ -0,0 +1,159 @@
+/*****************************************************************
+ *   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.
+ ****************************************************************/
+package org.apache.cayenne;
+
+import java.util.Map;
+
+import org.apache.cayenne.exp.ExpressionFactory;
+import org.apache.cayenne.query.RefreshQuery;
+import org.apache.cayenne.query.SelectQuery;
+import org.apache.cayenne.testdo.relationship.MapToMany;
+import org.apache.cayenne.testdo.relationship.MapToManyTarget;
+import org.apache.cayenne.unit.RelationshipCase;
+
+public class CDOMapRelationshipTest extends RelationshipCase {
+
+    protected void setUp() throws Exception {
+        deleteTestData();
+    }
+
+    public void testReadToMany() throws Exception {
+        createTestData("prepare");
+
+        MapToMany o1 = (MapToMany) DataObjectUtils.objectForPK(
+                createDataContext(),
+                MapToMany.class,
+                1);
+
+        Map targets = o1.getTargets();
+
+        assertTrue(((ValueHolder) targets).isFault());
+
+        assertNotNull(targets);
+        assertEquals(3, targets.size());
+        assertNotNull(targets.get("A"));
+        assertNotNull(targets.get("B"));
+        assertNotNull(targets.get("C"));
+
+        assertEquals(1, DataObjectUtils.intPKForObject((Persistent) targets.get("A")));
+        assertEquals(2, DataObjectUtils.intPKForObject((Persistent) targets.get("B")));
+        assertEquals(3, DataObjectUtils.intPKForObject((Persistent) targets.get("C")));
+    }
+
+    public void testReadToManyPrefetching() throws Exception {
+        createTestData("prepare");
+
+        SelectQuery query = new SelectQuery(MapToMany.class, ExpressionFactory
+                .matchDbExp(MapToMany.ID_PK_COLUMN, new Integer(1)));
+        query.addPrefetch(MapToMany.TARGETS_PROPERTY);
+        MapToMany o1 = (MapToMany) DataObjectUtils.objectForQuery(
+                createDataContext(),
+                query);
+
+        Map targets = o1.getTargets();
+
+        assertFalse(((ValueHolder) targets).isFault());
+
+        assertNotNull(targets);
+        assertEquals(3, targets.size());
+        assertNotNull(targets.get("A"));
+        assertNotNull(targets.get("B"));
+        assertNotNull(targets.get("C"));
+    }
+
+    public void testAddToMany() throws Exception {
+        createTestData("prepare");
+
+        MapToMany o1 = (MapToMany) DataObjectUtils.objectForPK(
+                createDataContext(),
+                MapToMany.class,
+                1);
+
+        Map targets = o1.getTargets();
+        assertNotNull(targets);
+        assertEquals(3, targets.size());
+
+        MapToManyTarget newTarget = (MapToManyTarget) o1.getObjectContext().newObject(
+                MapToManyTarget.class);
+
+        newTarget.setName("X");
+        o1.addToTargets(newTarget);
+        assertEquals(4, targets.size());
+        assertSame(newTarget, o1.getTargets().get("X"));
+        assertSame(o1, newTarget.getMapToMany());
+
+        o1.getObjectContext().commitChanges();
+
+        o1.getObjectContext().performGenericQuery(new RefreshQuery());
+        assertEquals(4, o1.getTargets().size());
+    }
+
+    public void testRemoveToMany() throws Exception {
+        createTestData("prepare");
+
+        MapToMany o1 = (MapToMany) DataObjectUtils.objectForPK(
+                createDataContext(),
+                MapToMany.class,
+                1);
+
+        Map targets = o1.getTargets();
+        assertEquals(3, targets.size());
+
+        MapToManyTarget target = (MapToManyTarget) targets.get("B");
+        o1.removeFromTargets(target);
+
+        assertEquals(2, targets.size());
+        assertNull(o1.getTargets().get("B"));
+        assertNull(target.getMapToMany());
+
+        o1.getObjectContext().commitChanges();
+
+        o1.getObjectContext().performGenericQuery(new RefreshQuery());
+        assertEquals(2, o1.getTargets().size());
+        assertNotNull(o1.getTargets().get("A"));
+        assertNotNull(o1.getTargets().get("C"));
+    }
+
+    public void testAddToManyViaReverse() throws Exception {
+        createTestData("prepare");
+
+        MapToMany o1 = (MapToMany) DataObjectUtils.objectForPK(
+                createDataContext(),
+                MapToMany.class,
+                1);
+
+        Map targets = o1.getTargets();
+        assertNotNull(targets);
+        assertEquals(3, targets.size());
+
+        MapToManyTarget newTarget = (MapToManyTarget) o1.getObjectContext().newObject(
+                MapToManyTarget.class);
+
+        newTarget.setName("X");
+        newTarget.setMapToMany(o1);
+        assertSame(o1, newTarget.getMapToMany());
+        assertEquals(4, targets.size());
+        assertSame(newTarget, o1.getTargets().get("X"));
+
+        o1.getObjectContext().commitChanges();
+
+        o1.getObjectContext().performGenericQuery(new RefreshQuery());
+        assertEquals(4, o1.getTargets().size());
+    }
+}

Added: cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/java/org/apache/cayenne/CDOSetRelationshipTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/java/org/apache/cayenne/CDOSetRelationshipTest.java?rev=568117&view=auto
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/java/org/apache/cayenne/CDOSetRelationshipTest.java (added)
+++ cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/java/org/apache/cayenne/CDOSetRelationshipTest.java Tue Aug 21 06:26:38 2007
@@ -0,0 +1,174 @@
+/*****************************************************************
+ *   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.
+ ****************************************************************/
+package org.apache.cayenne;
+
+import java.util.Set;
+
+import org.apache.cayenne.exp.ExpressionFactory;
+import org.apache.cayenne.query.RefreshQuery;
+import org.apache.cayenne.query.SelectQuery;
+import org.apache.cayenne.testdo.relationship.SetToMany;
+import org.apache.cayenne.testdo.relationship.SetToManyTarget;
+import org.apache.cayenne.unit.RelationshipCase;
+
+public class CDOSetRelationshipTest extends RelationshipCase {
+
+    protected void setUp() throws Exception {
+        deleteTestData();
+    }
+
+    public void testReadToMany() throws Exception {
+        createTestData("prepare");
+
+        SetToMany o1 = (SetToMany) DataObjectUtils.objectForPK(
+                createDataContext(),
+                SetToMany.class,
+                1);
+
+        Set targets = o1.getTargets();
+
+        assertNotNull(targets);
+        assertTrue(((ValueHolder) targets).isFault());
+
+        assertEquals(3, targets.size());
+
+        assertTrue(targets.contains(DataObjectUtils.objectForPK(
+                o1.getObjectContext(),
+                SetToManyTarget.class,
+                1)));
+        assertTrue(targets.contains(DataObjectUtils.objectForPK(
+                o1.getObjectContext(),
+                SetToManyTarget.class,
+                2)));
+        assertTrue(targets.contains(DataObjectUtils.objectForPK(
+                o1.getObjectContext(),
+                SetToManyTarget.class,
+                3)));
+    }
+
+    public void testReadToManyPrefetching() throws Exception {
+        createTestData("prepare");
+
+        SelectQuery query = new SelectQuery(SetToMany.class, ExpressionFactory
+                .matchDbExp(SetToMany.ID_PK_COLUMN, new Integer(1)));
+        query.addPrefetch(SetToMany.TARGETS_PROPERTY);
+        SetToMany o1 = (SetToMany) DataObjectUtils.objectForQuery(
+                createDataContext(),
+                query);
+
+        Set targets = o1.getTargets();
+
+        assertFalse(((ValueHolder) targets).isFault());
+
+        assertNotNull(targets);
+        assertEquals(3, targets.size());
+
+        assertTrue(targets.contains(DataObjectUtils.objectForPK(
+                o1.getObjectContext(),
+                SetToManyTarget.class,
+                1)));
+        assertTrue(targets.contains(DataObjectUtils.objectForPK(
+                o1.getObjectContext(),
+                SetToManyTarget.class,
+                2)));
+        assertTrue(targets.contains(DataObjectUtils.objectForPK(
+                o1.getObjectContext(),
+                SetToManyTarget.class,
+                3)));
+    }
+
+    public void testAddToMany() throws Exception {
+        createTestData("prepare");
+
+        SetToMany o1 = (SetToMany) DataObjectUtils.objectForPK(
+                createDataContext(),
+                SetToMany.class,
+                1);
+
+        Set targets = o1.getTargets();
+        assertNotNull(targets);
+        assertEquals(3, targets.size());
+
+        SetToManyTarget newTarget = (SetToManyTarget) o1.getObjectContext().newObject(
+                SetToManyTarget.class);
+
+        o1.addToTargets(newTarget);
+        assertEquals(4, targets.size());
+        assertTrue(o1.getTargets().contains(newTarget));
+        assertSame(o1, newTarget.getSetToMany());
+
+        o1.getObjectContext().commitChanges();
+
+        o1.getObjectContext().performGenericQuery(new RefreshQuery());
+        assertEquals(4, o1.getTargets().size());
+    }
+
+    public void testRemoveToMany() throws Exception {
+        createTestData("prepare");
+
+        SetToMany o1 = (SetToMany) DataObjectUtils.objectForPK(
+                createDataContext(),
+                SetToMany.class,
+                1);
+
+        Set targets = o1.getTargets();
+        assertEquals(3, targets.size());
+
+        SetToManyTarget target = (SetToManyTarget) DataObjectUtils.objectForPK(o1
+                .getObjectContext(), SetToManyTarget.class, 2);
+        o1.removeFromTargets(target);
+
+        assertEquals(2, targets.size());
+        assertFalse(o1.getTargets().contains(target));
+        assertNull(target.getSetToMany());
+
+        o1.getObjectContext().commitChanges();
+
+        o1.getObjectContext().performGenericQuery(new RefreshQuery());
+        assertEquals(2, o1.getTargets().size());
+        assertFalse(o1.getTargets().contains(target));
+    }
+
+    public void testAddToManyViaReverse() throws Exception {
+        createTestData("prepare");
+
+        SetToMany o1 = (SetToMany) DataObjectUtils.objectForPK(
+                createDataContext(),
+                SetToMany.class,
+                1);
+
+        Set targets = o1.getTargets();
+        assertNotNull(targets);
+        assertEquals(3, targets.size());
+
+        SetToManyTarget newTarget = (SetToManyTarget) o1.getObjectContext().newObject(
+                SetToManyTarget.class);
+
+        newTarget.setSetToMany(o1);
+        assertEquals(4, targets.size());
+        assertTrue(o1.getTargets().contains(newTarget));
+        assertSame(o1, newTarget.getSetToMany());
+
+        o1.getObjectContext().commitChanges();
+
+        o1.getObjectContext().performGenericQuery(new RefreshQuery());
+        assertEquals(4, o1.getTargets().size());
+    }
+
+}

Modified: cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/java/org/apache/cayenne/map/ObjRelationshipTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/java/org/apache/cayenne/map/ObjRelationshipTest.java?rev=568117&r1=568116&r2=568117&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/java/org/apache/cayenne/map/ObjRelationshipTest.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/java/org/apache/cayenne/map/ObjRelationshipTest.java Tue Aug 21 06:26:38 2007
@@ -19,12 +19,15 @@
 
 package org.apache.cayenne.map;
 
+import java.io.PrintWriter;
+import java.io.StringWriter;
 import java.util.List;
 
 import org.apache.cayenne.CayenneRuntimeException;
 import org.apache.cayenne.exp.ExpressionException;
 import org.apache.cayenne.unit.CayenneCase;
 import org.apache.cayenne.util.Util;
+import org.apache.cayenne.util.XMLEncoder;
 
 public class ObjRelationshipTest extends CayenneCase {
 
@@ -33,6 +36,37 @@
     protected DbEntity exhibitDBEntity = getDbEntity("EXHIBIT");
     protected DbEntity paintingDbEntity = getDbEntity("PAINTING");
     protected DbEntity galleryDBEntity = getDbEntity("GALLERY");
+
+    public void testEncodeAsXML() {
+        StringWriter buffer = new StringWriter();
+        PrintWriter out = new PrintWriter(buffer);
+        XMLEncoder encoder = new XMLEncoder(out);
+
+        DataMap map = new DataMap("M");
+        ObjEntity source = new ObjEntity("S");
+        ObjEntity target = new ObjEntity("T");
+        map.addObjEntity(source);
+        map.addObjEntity(target);
+
+        ObjRelationship r = new ObjRelationship("X");
+        r.setSourceEntity(source);
+        r.setTargetEntityName("T");
+        r.setCollectionType("java.util.Map");
+        r.setMapKey("bla");
+
+        r.encodeAsXML(encoder);
+        out.close();
+
+        assertEquals("<obj-relationship name=\"X\" source=\"S\" target=\"T\" "
+                + "collection-type=\"java.util.Map\" map-key=\"bla\"/>\n", buffer.getBuffer().toString());
+    }
+
+    public void testCollectionType() {
+        ObjRelationship r = new ObjRelationship("X");
+        assertNull(r.getCollectionType());
+        r.setCollectionType("java.util.Map");
+        assertEquals("java.util.Map", r.getCollectionType());
+    }
 
     public void testSerializability() throws Exception {
         ObjRelationship r1 = new ObjRelationship("r1");

Added: cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/java/org/apache/cayenne/testdo/relationship/CollectionToMany.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/java/org/apache/cayenne/testdo/relationship/CollectionToMany.java?rev=568117&view=auto
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/java/org/apache/cayenne/testdo/relationship/CollectionToMany.java (added)
+++ cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/java/org/apache/cayenne/testdo/relationship/CollectionToMany.java Tue Aug 21 06:26:38 2007
@@ -0,0 +1,10 @@
+package org.apache.cayenne.testdo.relationship;
+
+import org.apache.cayenne.testdo.relationship.auto._CollectionToMany;
+
+public class CollectionToMany extends _CollectionToMany {
+
+}
+
+
+

Added: cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/java/org/apache/cayenne/testdo/relationship/CollectionToManyTarget.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/java/org/apache/cayenne/testdo/relationship/CollectionToManyTarget.java?rev=568117&view=auto
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/java/org/apache/cayenne/testdo/relationship/CollectionToManyTarget.java (added)
+++ cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/java/org/apache/cayenne/testdo/relationship/CollectionToManyTarget.java Tue Aug 21 06:26:38 2007
@@ -0,0 +1,10 @@
+package org.apache.cayenne.testdo.relationship;
+
+import org.apache.cayenne.testdo.relationship.auto._CollectionToManyTarget;
+
+public class CollectionToManyTarget extends _CollectionToManyTarget {
+
+}
+
+
+

Added: cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/java/org/apache/cayenne/testdo/relationship/MapToMany.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/java/org/apache/cayenne/testdo/relationship/MapToMany.java?rev=568117&view=auto
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/java/org/apache/cayenne/testdo/relationship/MapToMany.java (added)
+++ cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/java/org/apache/cayenne/testdo/relationship/MapToMany.java Tue Aug 21 06:26:38 2007
@@ -0,0 +1,10 @@
+package org.apache.cayenne.testdo.relationship;
+
+import org.apache.cayenne.testdo.relationship.auto._MapToMany;
+
+public class MapToMany extends _MapToMany {
+
+}
+
+
+

Added: cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/java/org/apache/cayenne/testdo/relationship/MapToManyTarget.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/java/org/apache/cayenne/testdo/relationship/MapToManyTarget.java?rev=568117&view=auto
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/java/org/apache/cayenne/testdo/relationship/MapToManyTarget.java (added)
+++ cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/java/org/apache/cayenne/testdo/relationship/MapToManyTarget.java Tue Aug 21 06:26:38 2007
@@ -0,0 +1,10 @@
+package org.apache.cayenne.testdo.relationship;
+
+import org.apache.cayenne.testdo.relationship.auto._MapToManyTarget;
+
+public class MapToManyTarget extends _MapToManyTarget {
+
+}
+
+
+

Added: cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/java/org/apache/cayenne/testdo/relationship/SetToMany.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/java/org/apache/cayenne/testdo/relationship/SetToMany.java?rev=568117&view=auto
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/java/org/apache/cayenne/testdo/relationship/SetToMany.java (added)
+++ cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/java/org/apache/cayenne/testdo/relationship/SetToMany.java Tue Aug 21 06:26:38 2007
@@ -0,0 +1,10 @@
+package org.apache.cayenne.testdo.relationship;
+
+import org.apache.cayenne.testdo.relationship.auto._SetToMany;
+
+public class SetToMany extends _SetToMany {
+
+}
+
+
+

Added: cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/java/org/apache/cayenne/testdo/relationship/SetToManyTarget.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/java/org/apache/cayenne/testdo/relationship/SetToManyTarget.java?rev=568117&view=auto
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/java/org/apache/cayenne/testdo/relationship/SetToManyTarget.java (added)
+++ cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/java/org/apache/cayenne/testdo/relationship/SetToManyTarget.java Tue Aug 21 06:26:38 2007
@@ -0,0 +1,10 @@
+package org.apache.cayenne.testdo.relationship;
+
+import org.apache.cayenne.testdo.relationship.auto._SetToManyTarget;
+
+public class SetToManyTarget extends _SetToManyTarget {
+
+}
+
+
+

Added: cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/java/org/apache/cayenne/testdo/relationship/auto/_CollectionToMany.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/java/org/apache/cayenne/testdo/relationship/auto/_CollectionToMany.java?rev=568117&view=auto
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/java/org/apache/cayenne/testdo/relationship/auto/_CollectionToMany.java (added)
+++ cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/java/org/apache/cayenne/testdo/relationship/auto/_CollectionToMany.java Tue Aug 21 06:26:38 2007
@@ -0,0 +1,25 @@
+package org.apache.cayenne.testdo.relationship.auto;
+
+/** Class _CollectionToMany was generated by Cayenne.
+  * It is probably a good idea to avoid changing this class manually, 
+  * since it may be overwritten next time code is regenerated. 
+  * If you need to make any customizations, please use subclass. 
+  */
+public class _CollectionToMany extends org.apache.cayenne.CayenneDataObject {
+
+    public static final String TARGETS_PROPERTY = "targets";
+
+    public static final String ID_PK_COLUMN = "ID";
+
+    public void addToTargets(org.apache.cayenne.testdo.relationship.CollectionToManyTarget obj) {
+        addToManyTarget("targets", obj, true);
+    }
+    public void removeFromTargets(org.apache.cayenne.testdo.relationship.CollectionToManyTarget obj) {
+        removeToManyTarget("targets", obj, true);
+    }
+    public java.util.Collection getTargets() {
+        return (java.util.Collection)readProperty("targets");
+    }
+    
+    
+}

Added: cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/java/org/apache/cayenne/testdo/relationship/auto/_CollectionToManyTarget.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/java/org/apache/cayenne/testdo/relationship/auto/_CollectionToManyTarget.java?rev=568117&view=auto
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/java/org/apache/cayenne/testdo/relationship/auto/_CollectionToManyTarget.java (added)
+++ cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/java/org/apache/cayenne/testdo/relationship/auto/_CollectionToManyTarget.java Tue Aug 21 06:26:38 2007
@@ -0,0 +1,23 @@
+package org.apache.cayenne.testdo.relationship.auto;
+
+/** Class _CollectionToManyTarget was generated by Cayenne.
+  * It is probably a good idea to avoid changing this class manually, 
+  * since it may be overwritten next time code is regenerated. 
+  * If you need to make any customizations, please use subclass. 
+  */
+public class _CollectionToManyTarget extends org.apache.cayenne.CayenneDataObject {
+
+    public static final String COLLECTION_TO_MANY_PROPERTY = "collectionToMany";
+
+    public static final String ID_PK_COLUMN = "ID";
+
+    public void setCollectionToMany(org.apache.cayenne.testdo.relationship.CollectionToMany collectionToMany) {
+        setToOneTarget("collectionToMany", collectionToMany, true);
+    }
+
+    public org.apache.cayenne.testdo.relationship.CollectionToMany getCollectionToMany() {
+        return (org.apache.cayenne.testdo.relationship.CollectionToMany)readProperty("collectionToMany");
+    } 
+    
+    
+}

Added: cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/java/org/apache/cayenne/testdo/relationship/auto/_MapToMany.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/java/org/apache/cayenne/testdo/relationship/auto/_MapToMany.java?rev=568117&view=auto
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/java/org/apache/cayenne/testdo/relationship/auto/_MapToMany.java (added)
+++ cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/java/org/apache/cayenne/testdo/relationship/auto/_MapToMany.java Tue Aug 21 06:26:38 2007
@@ -0,0 +1,25 @@
+package org.apache.cayenne.testdo.relationship.auto;
+
+/** Class _MapToMany was generated by Cayenne.
+  * It is probably a good idea to avoid changing this class manually, 
+  * since it may be overwritten next time code is regenerated. 
+  * If you need to make any customizations, please use subclass. 
+  */
+public class _MapToMany extends org.apache.cayenne.CayenneDataObject {
+
+    public static final String TARGETS_PROPERTY = "targets";
+
+    public static final String ID_PK_COLUMN = "ID";
+
+    public void addToTargets(org.apache.cayenne.testdo.relationship.MapToManyTarget obj) {
+        addToManyTarget("targets", obj, true);
+    }
+    public void removeFromTargets(org.apache.cayenne.testdo.relationship.MapToManyTarget obj) {
+        removeToManyTarget("targets", obj, true);
+    }
+    public java.util.Map getTargets() {
+        return (java.util.Map)readProperty("targets");
+    }
+    
+    
+}

Added: cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/java/org/apache/cayenne/testdo/relationship/auto/_MapToManyTarget.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/java/org/apache/cayenne/testdo/relationship/auto/_MapToManyTarget.java?rev=568117&view=auto
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/java/org/apache/cayenne/testdo/relationship/auto/_MapToManyTarget.java (added)
+++ cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/java/org/apache/cayenne/testdo/relationship/auto/_MapToManyTarget.java Tue Aug 21 06:26:38 2007
@@ -0,0 +1,32 @@
+package org.apache.cayenne.testdo.relationship.auto;
+
+/** Class _MapToManyTarget was generated by Cayenne.
+  * It is probably a good idea to avoid changing this class manually, 
+  * since it may be overwritten next time code is regenerated. 
+  * If you need to make any customizations, please use subclass. 
+  */
+public class _MapToManyTarget extends org.apache.cayenne.CayenneDataObject {
+
+    public static final String NAME_PROPERTY = "name";
+    public static final String MAP_TO_MANY_PROPERTY = "mapToMany";
+
+    public static final String ID_PK_COLUMN = "ID";
+
+    public void setName(String name) {
+        writeProperty("name", name);
+    }
+    public String getName() {
+        return (String)readProperty("name");
+    }
+    
+    
+    public void setMapToMany(org.apache.cayenne.testdo.relationship.MapToMany mapToMany) {
+        setToOneTarget("mapToMany", mapToMany, true);
+    }
+
+    public org.apache.cayenne.testdo.relationship.MapToMany getMapToMany() {
+        return (org.apache.cayenne.testdo.relationship.MapToMany)readProperty("mapToMany");
+    } 
+    
+    
+}

Added: cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/java/org/apache/cayenne/testdo/relationship/auto/_SetToMany.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/java/org/apache/cayenne/testdo/relationship/auto/_SetToMany.java?rev=568117&view=auto
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/java/org/apache/cayenne/testdo/relationship/auto/_SetToMany.java (added)
+++ cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/java/org/apache/cayenne/testdo/relationship/auto/_SetToMany.java Tue Aug 21 06:26:38 2007
@@ -0,0 +1,25 @@
+package org.apache.cayenne.testdo.relationship.auto;
+
+/** Class _SetToMany was generated by Cayenne.
+  * It is probably a good idea to avoid changing this class manually, 
+  * since it may be overwritten next time code is regenerated. 
+  * If you need to make any customizations, please use subclass. 
+  */
+public class _SetToMany extends org.apache.cayenne.CayenneDataObject {
+
+    public static final String TARGETS_PROPERTY = "targets";
+
+    public static final String ID_PK_COLUMN = "ID";
+
+    public void addToTargets(org.apache.cayenne.testdo.relationship.SetToManyTarget obj) {
+        addToManyTarget("targets", obj, true);
+    }
+    public void removeFromTargets(org.apache.cayenne.testdo.relationship.SetToManyTarget obj) {
+        removeToManyTarget("targets", obj, true);
+    }
+    public java.util.Set getTargets() {
+        return (java.util.Set)readProperty("targets");
+    }
+    
+    
+}

Added: cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/java/org/apache/cayenne/testdo/relationship/auto/_SetToManyTarget.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/java/org/apache/cayenne/testdo/relationship/auto/_SetToManyTarget.java?rev=568117&view=auto
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/java/org/apache/cayenne/testdo/relationship/auto/_SetToManyTarget.java (added)
+++ cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/java/org/apache/cayenne/testdo/relationship/auto/_SetToManyTarget.java Tue Aug 21 06:26:38 2007
@@ -0,0 +1,23 @@
+package org.apache.cayenne.testdo.relationship.auto;
+
+/** Class _SetToManyTarget was generated by Cayenne.
+  * It is probably a good idea to avoid changing this class manually, 
+  * since it may be overwritten next time code is regenerated. 
+  * If you need to make any customizations, please use subclass. 
+  */
+public class _SetToManyTarget extends org.apache.cayenne.CayenneDataObject {
+
+    public static final String SET_TO_MANY_PROPERTY = "setToMany";
+
+    public static final String ID_PK_COLUMN = "ID";
+
+    public void setSetToMany(org.apache.cayenne.testdo.relationship.SetToMany setToMany) {
+        setToOneTarget("setToMany", setToMany, true);
+    }
+
+    public org.apache.cayenne.testdo.relationship.SetToMany getSetToMany() {
+        return (org.apache.cayenne.testdo.relationship.SetToMany)readProperty("setToMany");
+    } 
+    
+    
+}

Modified: cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/resources/cayenne.xml
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/resources/cayenne.xml?rev=568117&r1=568116&r2=568117&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/resources/cayenne.xml (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/resources/cayenne.xml Tue Aug 21 06:26:38 2007
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<domains project-version="2.0">
+<domains project-version="3.0">
 <domain name="default">
 	<map name="embeddable" location="embeddable.map.xml"/>
 	<map name="generic" location="generic.map.xml"/>

Added: cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/resources/dml/CDOCollectionRelationshipTest.xml
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/resources/dml/CDOCollectionRelationshipTest.xml?rev=568117&view=auto
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/resources/dml/CDOCollectionRelationshipTest.xml (added)
+++ cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/resources/dml/CDOCollectionRelationshipTest.xml Tue Aug 21 06:26:38 2007
@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
+
+<beans default-lazy-init="true">
+
+	<bean id="O1" class="org.apache.cayenne.unit.util.UpdatingSQLTemplate">
+		<constructor-arg type="java.lang.Class">
+			<value>org.apache.cayenne.testdo.relationship.CollectionToMany</value>
+		</constructor-arg>
+		<constructor-arg>
+			<value>
+				INSERT INTO COLLECTION_TO_MANY (ID)
+				VALUES (1)
+			</value>
+		</constructor-arg>
+	</bean>
+	
+	<bean id="O2" class="org.apache.cayenne.unit.util.UpdatingSQLTemplate">
+		<constructor-arg type="java.lang.Class">
+			<value>org.apache.cayenne.testdo.relationship.CollectionToMany</value>
+		</constructor-arg>
+		<constructor-arg>
+			<value>
+				INSERT INTO COLLECTION_TO_MANY (ID)
+				VALUES (2)
+			</value>
+		</constructor-arg>
+	</bean>
+	
+	<bean id="O1C1" class="org.apache.cayenne.unit.util.UpdatingSQLTemplate">
+		<constructor-arg type="java.lang.Class">
+			<value>org.apache.cayenne.testdo.relationship.CollectionToManyTarget</value>
+		</constructor-arg>
+		<constructor-arg>
+			<value>
+				INSERT INTO COLLECTION_TO_MANY_TARGET (ID, COLLECTION_TO_MANY_ID)
+				VALUES (1, 1)
+			</value>
+		</constructor-arg>
+	</bean>
+	
+	<bean id="O1C2" class="org.apache.cayenne.unit.util.UpdatingSQLTemplate">
+		<constructor-arg type="java.lang.Class">
+			<value>org.apache.cayenne.testdo.relationship.CollectionToManyTarget</value>
+		</constructor-arg>
+		<constructor-arg>
+			<value>
+				INSERT INTO COLLECTION_TO_MANY_TARGET (ID, COLLECTION_TO_MANY_ID)
+				VALUES (2, 1)
+			</value>
+		</constructor-arg>
+	</bean>
+
+	<bean id="O1C3" class="org.apache.cayenne.unit.util.UpdatingSQLTemplate">
+		<constructor-arg type="java.lang.Class">
+			<value>org.apache.cayenne.testdo.relationship.CollectionToManyTarget</value>
+		</constructor-arg>
+		<constructor-arg>
+			<value>
+				INSERT INTO COLLECTION_TO_MANY_TARGET (ID, COLLECTION_TO_MANY_ID)
+				VALUES (3, 1)
+			</value>
+		</constructor-arg>
+	</bean>
+	
+	<bean id="O2C1" class="org.apache.cayenne.unit.util.UpdatingSQLTemplate">
+		<constructor-arg type="java.lang.Class">
+			<value>org.apache.cayenne.testdo.relationship.CollectionToManyTarget</value>
+		</constructor-arg>
+		<constructor-arg>
+			<value>
+				INSERT INTO COLLECTION_TO_MANY_TARGET (ID, COLLECTION_TO_MANY_ID)
+				VALUES (4, 2)
+			</value>
+		</constructor-arg>
+	</bean>
+
+	<!-- ======================================= -->
+	<!-- Data Sets -->
+	<!-- ======================================= -->
+
+	<bean id="prepare" class="java.util.ArrayList">
+		<constructor-arg>
+			<list>
+				<ref bean="O1" />
+				<ref bean="O2" />
+				<ref bean="O1C1" />
+				<ref bean="O1C2" />
+				<ref bean="O1C3" />
+				<ref bean="O2C1" />
+			</list>
+		</constructor-arg>
+	</bean>
+</beans>
\ No newline at end of file

Added: cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/resources/dml/CDOMapRelationshipTest.xml
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/resources/dml/CDOMapRelationshipTest.xml?rev=568117&view=auto
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/resources/dml/CDOMapRelationshipTest.xml (added)
+++ cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/resources/dml/CDOMapRelationshipTest.xml Tue Aug 21 06:26:38 2007
@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
+
+<beans default-lazy-init="true">
+
+	<bean id="O1" class="org.apache.cayenne.unit.util.UpdatingSQLTemplate">
+		<constructor-arg type="java.lang.Class">
+			<value>org.apache.cayenne.testdo.relationship.MapToMany</value>
+		</constructor-arg>
+		<constructor-arg>
+			<value>
+				INSERT INTO MAP_TO_MANY (ID)
+				VALUES (1)
+			</value>
+		</constructor-arg>
+	</bean>
+	
+	<bean id="O2" class="org.apache.cayenne.unit.util.UpdatingSQLTemplate">
+		<constructor-arg type="java.lang.Class">
+			<value>org.apache.cayenne.testdo.relationship.MapToMany</value>
+		</constructor-arg>
+		<constructor-arg>
+			<value>
+				INSERT INTO MAP_TO_MANY (ID)
+				VALUES (2)
+			</value>
+		</constructor-arg>
+	</bean>
+	
+	<bean id="O1C1" class="org.apache.cayenne.unit.util.UpdatingSQLTemplate">
+		<constructor-arg type="java.lang.Class">
+			<value>org.apache.cayenne.testdo.relationship.MapToManyTarget</value>
+		</constructor-arg>
+		<constructor-arg>
+			<value>
+				INSERT INTO MAP_TO_MANY_TARGET (ID, MAP_TO_MANY_ID, NAME)
+				VALUES (1, 1, 'A')
+			</value>
+		</constructor-arg>
+	</bean>
+	
+	<bean id="O1C2" class="org.apache.cayenne.unit.util.UpdatingSQLTemplate">
+		<constructor-arg type="java.lang.Class">
+			<value>org.apache.cayenne.testdo.relationship.MapToManyTarget</value>
+		</constructor-arg>
+		<constructor-arg>
+			<value>
+				INSERT INTO MAP_TO_MANY_TARGET (ID, MAP_TO_MANY_ID, NAME)
+				VALUES (2, 1, 'B')
+			</value>
+		</constructor-arg>
+	</bean>
+
+	<bean id="O1C3" class="org.apache.cayenne.unit.util.UpdatingSQLTemplate">
+		<constructor-arg type="java.lang.Class">
+			<value>org.apache.cayenne.testdo.relationship.MapToManyTarget</value>
+		</constructor-arg>
+		<constructor-arg>
+			<value>
+				INSERT INTO MAP_TO_MANY_TARGET (ID, MAP_TO_MANY_ID, NAME)
+				VALUES (3, 1, 'C')
+			</value>
+		</constructor-arg>
+	</bean>
+	
+	<bean id="O2C1" class="org.apache.cayenne.unit.util.UpdatingSQLTemplate">
+		<constructor-arg type="java.lang.Class">
+			<value>org.apache.cayenne.testdo.relationship.MapToManyTarget</value>
+		</constructor-arg>
+		<constructor-arg>
+			<value>
+				INSERT INTO MAP_TO_MANY_TARGET (ID, MAP_TO_MANY_ID, NAME)
+				VALUES (4, 2, 'A')
+			</value>
+		</constructor-arg>
+	</bean>
+
+	<!-- ======================================= -->
+	<!-- Data Sets -->
+	<!-- ======================================= -->
+
+	<bean id="prepare" class="java.util.ArrayList">
+		<constructor-arg>
+			<list>
+				<ref bean="O1" />
+				<ref bean="O2" />
+				<ref bean="O1C1" />
+				<ref bean="O1C2" />
+				<ref bean="O1C3" />
+				<ref bean="O2C1" />
+			</list>
+		</constructor-arg>
+	</bean>
+</beans>
\ No newline at end of file

Added: cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/resources/dml/CDOSetRelationshipTest.xml
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/resources/dml/CDOSetRelationshipTest.xml?rev=568117&view=auto
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/resources/dml/CDOSetRelationshipTest.xml (added)
+++ cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/resources/dml/CDOSetRelationshipTest.xml Tue Aug 21 06:26:38 2007
@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
+
+<beans default-lazy-init="true">
+
+	<bean id="O1" class="org.apache.cayenne.unit.util.UpdatingSQLTemplate">
+		<constructor-arg type="java.lang.Class">
+			<value>org.apache.cayenne.testdo.relationship.SetToMany</value>
+		</constructor-arg>
+		<constructor-arg>
+			<value>
+				INSERT INTO SET_TO_MANY (ID)
+				VALUES (1)
+			</value>
+		</constructor-arg>
+	</bean>
+	
+	<bean id="O2" class="org.apache.cayenne.unit.util.UpdatingSQLTemplate">
+		<constructor-arg type="java.lang.Class">
+			<value>org.apache.cayenne.testdo.relationship.SetToMany</value>
+		</constructor-arg>
+		<constructor-arg>
+			<value>
+				INSERT INTO SET_TO_MANY (ID)
+				VALUES (2)
+			</value>
+		</constructor-arg>
+	</bean>
+	
+	<bean id="O1C1" class="org.apache.cayenne.unit.util.UpdatingSQLTemplate">
+		<constructor-arg type="java.lang.Class">
+			<value>org.apache.cayenne.testdo.relationship.SetToManyTarget</value>
+		</constructor-arg>
+		<constructor-arg>
+			<value>
+				INSERT INTO SET_TO_MANY_TARGET (ID, SET_TO_MANY_ID)
+				VALUES (1, 1)
+			</value>
+		</constructor-arg>
+	</bean>
+	
+	<bean id="O1C2" class="org.apache.cayenne.unit.util.UpdatingSQLTemplate">
+		<constructor-arg type="java.lang.Class">
+			<value>org.apache.cayenne.testdo.relationship.SetToManyTarget</value>
+		</constructor-arg>
+		<constructor-arg>
+			<value>
+				INSERT INTO SET_TO_MANY_TARGET (ID, SET_TO_MANY_ID)
+				VALUES (2, 1)
+			</value>
+		</constructor-arg>
+	</bean>
+
+	<bean id="O1C3" class="org.apache.cayenne.unit.util.UpdatingSQLTemplate">
+		<constructor-arg type="java.lang.Class">
+			<value>org.apache.cayenne.testdo.relationship.SetToManyTarget</value>
+		</constructor-arg>
+		<constructor-arg>
+			<value>
+				INSERT INTO SET_TO_MANY_TARGET (ID, SET_TO_MANY_ID)
+				VALUES (3, 1)
+			</value>
+		</constructor-arg>
+	</bean>
+	
+	<bean id="O2C1" class="org.apache.cayenne.unit.util.UpdatingSQLTemplate">
+		<constructor-arg type="java.lang.Class">
+			<value>org.apache.cayenne.testdo.relationship.SetToManyTarget</value>
+		</constructor-arg>
+		<constructor-arg>
+			<value>
+				INSERT INTO SET_TO_MANY_TARGET (ID, SET_TO_MANY_ID)
+				VALUES (4, 2)
+			</value>
+		</constructor-arg>
+	</bean>
+
+	<!-- ======================================= -->
+	<!-- Data Sets -->
+	<!-- ======================================= -->
+
+	<bean id="prepare" class="java.util.ArrayList">
+		<constructor-arg>
+			<list>
+				<ref bean="O1" />
+				<ref bean="O2" />
+				<ref bean="O1C1" />
+				<ref bean="O1C2" />
+				<ref bean="O1C3" />
+				<ref bean="O2C1" />
+			</list>
+		</constructor-arg>
+	</bean>
+</beans>
\ No newline at end of file

Modified: cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/resources/embeddable.map.xml
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/resources/embeddable.map.xml?rev=568117&r1=568116&r2=568117&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/resources/embeddable.map.xml (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/resources/embeddable.map.xml Tue Aug 21 06:26:38 2007
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<data-map project-version="2.0">
+<data-map project-version="3.0">
 	<property name="defaultPackage" value="org.apache.cayenne.testdo.embeddable"/>
 	<embeddable className="org.apache.cayenne.testdo.embeddable.Embeddable1">
 		<embeddable-attribute name="embedded10" type="java.lang.String" db-attribute-name="EMBEDDED10"/>

Modified: cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/resources/generic.map.xml
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/resources/generic.map.xml?rev=568117&r1=568116&r2=568117&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/resources/generic.map.xml (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/resources/generic.map.xml Tue Aug 21 06:26:38 2007
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<data-map project-version="2.0">
+<data-map project-version="3.0">
 	<db-entity name="GENERIC1">
 		<db-attribute name="ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
 		<db-attribute name="NAME" type="VARCHAR" length="200"/>

Modified: cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/resources/locking.map.xml
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/resources/locking.map.xml?rev=568117&r1=568116&r2=568117&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/resources/locking.map.xml (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/resources/locking.map.xml Tue Aug 21 06:26:38 2007
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<data-map project-version="2.0">
+<data-map project-version="3.0">
 	<property name="defaultPackage" value="org.apache.cayenne.testdo.locking"/>
 	<db-entity name="DATE_LOCKING_TEST">
 		<db-attribute name="DATE_LOCK" type="DATE"/>

Modified: cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/resources/map-db1.map.xml
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/resources/map-db1.map.xml?rev=568117&r1=568116&r2=568117&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/resources/map-db1.map.xml (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/resources/map-db1.map.xml Tue Aug 21 06:26:38 2007
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<data-map project-version="2.0">
+<data-map project-version="3.0">
 	<property name="defaultPackage" value="org.apache.cayenne.testdo.db1"/>
 	<db-entity name="CROSSDB_M1E1">
 		<db-attribute name="ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>

Modified: cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/resources/map-db2.map.xml
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/resources/map-db2.map.xml?rev=568117&r1=568116&r2=568117&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/resources/map-db2.map.xml (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/resources/map-db2.map.xml Tue Aug 21 06:26:38 2007
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<data-map project-version="2.0">
+<data-map project-version="3.0">
 	<property name="defaultPackage" value="org.apache.cayenne.testdo.db2"/>
 	<db-entity name="CROSSDB_M2E1">
 		<db-attribute name="ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>

Modified: cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/resources/multi-tier.map.xml
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/resources/multi-tier.map.xml?rev=568117&r1=568116&r2=568117&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/resources/multi-tier.map.xml (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/resources/multi-tier.map.xml Tue Aug 21 06:26:38 2007
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<data-map project-version="2.0">
+<data-map project-version="3.0">
 	<property name="defaultPackage" value="org.apache.cayenne.testdo.mt"/>
 	<property name="clientSupported" value="true"/>
 	<property name="defaultClientPackage" value="org.apache.cayenne.testdo.mt"/>

Modified: cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/resources/people.map.xml
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/resources/people.map.xml?rev=568117&r1=568116&r2=568117&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/resources/people.map.xml (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/resources/people.map.xml Tue Aug 21 06:26:38 2007
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<data-map project-version="2.0">
+<data-map project-version="3.0">
 	<property name="defaultPackage" value="org.apache.cayenne.testdo.inherit"/>
 	<db-entity name="ADDRESS">
 		<db-attribute name="ADDRESS_ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>

Modified: cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/resources/relationships.map.xml
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/resources/relationships.map.xml?rev=568117&r1=568116&r2=568117&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/resources/relationships.map.xml (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/resources/relationships.map.xml Tue Aug 21 06:26:38 2007
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<data-map project-version="2.0">
+<data-map project-version="3.0">
 	<property name="defaultPackage" value="org.apache.cayenne.testdo.relationship"/>
 	<db-entity name="CLOB_DETAIL">
 		<db-attribute name="CLOB_DETAIL_ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
@@ -11,6 +11,13 @@
 		<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="COLLECTION_TO_MANY">
+		<db-attribute name="ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
+	</db-entity>
+	<db-entity name="COLLECTION_TO_MANY_TARGET">
+		<db-attribute name="COLLECTION_TO_MANY_ID" type="INTEGER"/>
+		<db-attribute name="ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
+	</db-entity>
 	<db-entity name="COMPLEX_JOIN">
 		<db-attribute name="EXTRA_COLUMN" type="VARCHAR" length="50"/>
 		<db-attribute name="FT1_FK" type="INTEGER"/>
@@ -56,6 +63,14 @@
 		<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="MAP_TO_MANY">
+		<db-attribute name="ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
+	</db-entity>
+	<db-entity name="MAP_TO_MANY_TARGET">
+		<db-attribute name="ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
+		<db-attribute name="MAP_TO_MANY_ID" type="INTEGER"/>
+		<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"/>
@@ -70,6 +85,13 @@
 		<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="SET_TO_MANY">
+		<db-attribute name="ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
+	</db-entity>
+	<db-entity name="SET_TO_MANY_TARGET">
+		<db-attribute name="ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
+		<db-attribute name="SET_TO_MANY_ID" type="INTEGER"/>
+	</db-entity>
 	<db-entity name="TO_MANY_FKDEP">
 		<db-attribute name="DEP_ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
 		<db-attribute name="NAME" type="VARCHAR" length="200"/>
@@ -98,6 +120,10 @@
 		<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="CollectionToMany" className="org.apache.cayenne.testdo.relationship.CollectionToMany" dbEntityName="COLLECTION_TO_MANY">
+	</obj-entity>
+	<obj-entity name="CollectionToManyTarget" className="org.apache.cayenne.testdo.relationship.CollectionToManyTarget" dbEntityName="COLLECTION_TO_MANY_TARGET">
+	</obj-entity>
 	<obj-entity name="DeleteRuleFlatA" className="org.apache.cayenne.testdo.relationship.DeleteRuleFlatA" dbEntityName="DELETE_RULE_FLATA">
 	</obj-entity>
 	<obj-entity name="DeleteRuleFlatB" className="org.apache.cayenne.testdo.relationship.DeleteRuleFlatB" dbEntityName="DELETE_RULE_FLATB">
@@ -119,6 +145,11 @@
 	<obj-entity name="FlattenedTest3" className="org.apache.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="MapToMany" className="org.apache.cayenne.testdo.relationship.MapToMany" dbEntityName="MAP_TO_MANY">
+	</obj-entity>
+	<obj-entity name="MapToManyTarget" className="org.apache.cayenne.testdo.relationship.MapToManyTarget" dbEntityName="MAP_TO_MANY_TARGET">
+		<obj-attribute name="name" type="java.lang.String" db-attribute-path="NAME"/>
+	</obj-entity>
 	<obj-entity name="MeaningfulFK" className="org.apache.cayenne.testdo.relationship.MeaningfulFK" dbEntityName="MEANINGFUL_FK">
 		<obj-attribute name="relationshipHelperID" type="java.lang.Integer" db-attribute-path="RELATIONSHIP_HELPER_ID"/>
 	</obj-entity>
@@ -128,6 +159,10 @@
 	<obj-entity name="RelationshipHelper" className="org.apache.cayenne.testdo.relationship.RelationshipHelper" dbEntityName="RELATIONSHIP_HELPER">
 		<obj-attribute name="name" type="java.lang.String" db-attribute-path="NAME"/>
 	</obj-entity>
+	<obj-entity name="SetToMany" className="org.apache.cayenne.testdo.relationship.SetToMany" dbEntityName="SET_TO_MANY">
+	</obj-entity>
+	<obj-entity name="SetToManyTarget" className="org.apache.cayenne.testdo.relationship.SetToManyTarget" dbEntityName="SET_TO_MANY_TARGET">
+	</obj-entity>
 	<obj-entity name="ToManyFkDep" className="org.apache.cayenne.testdo.relationship.ToManyFkDep" dbEntityName="TO_MANY_FKDEP">
 		<obj-attribute name="depId" type="java.lang.Integer" db-attribute-path="DEP_ID"/>
 		<obj-attribute name="name" type="java.lang.String" db-attribute-path="NAME"/>
@@ -149,6 +184,12 @@
 	<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="targets" source="COLLECTION_TO_MANY" target="COLLECTION_TO_MANY_TARGET" toMany="true">
+		<db-attribute-pair source="ID" target="COLLECTION_TO_MANY_ID"/>
+	</db-relationship>
+	<db-relationship name="collectionToMany" source="COLLECTION_TO_MANY_TARGET" target="COLLECTION_TO_MANY" toMany="false">
+		<db-attribute-pair source="COLLECTION_TO_MANY_ID" target="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>
@@ -203,6 +244,12 @@
 	<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="targets" source="MAP_TO_MANY" target="MAP_TO_MANY_TARGET" toMany="true">
+		<db-attribute-pair source="ID" target="MAP_TO_MANY_ID"/>
+	</db-relationship>
+	<db-relationship name="mapToMany" source="MAP_TO_MANY_TARGET" target="MAP_TO_MANY" toMany="false">
+		<db-attribute-pair source="MAP_TO_MANY_ID" target="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>
@@ -224,6 +271,12 @@
 	<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="targets" source="SET_TO_MANY" target="SET_TO_MANY_TARGET" toMany="true">
+		<db-attribute-pair source="ID" target="SET_TO_MANY_ID"/>
+	</db-relationship>
+	<db-relationship name="setToMany" source="SET_TO_MANY_TARGET" target="SET_TO_MANY" toMany="false">
+		<db-attribute-pair source="SET_TO_MANY_ID" target="ID"/>
+	</db-relationship>
 	<db-relationship name="root" source="TO_MANY_FKDEP" target="TO_MANY_FKROOT" toMany="false">
 		<db-attribute-pair source="DEP_ID" target="FK_ID"/>
 	</db-relationship>
@@ -244,6 +297,8 @@
 	</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="targets" source="CollectionToMany" target="CollectionToManyTarget" collection-type="java.util.Collection" db-relationship-path="targets"/>
+	<obj-relationship name="collectionToMany" source="CollectionToManyTarget" target="CollectionToMany" db-relationship-path="collectionToMany"/>
 	<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"/>
@@ -258,6 +313,8 @@
 	<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="targets" source="MapToMany" target="MapToManyTarget" collection-type="java.util.Map" map-key="name" db-relationship-path="targets"/>
+	<obj-relationship name="mapToMany" source="MapToManyTarget" target="MapToMany" db-relationship-path="mapToMany"/>
 	<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"/>
@@ -265,6 +322,8 @@
 	<obj-relationship name="fksOfDifferentType" source="RelationshipHelper" target="FkOfDifferentType" db-relationship-path="fksOfDifferentType"/>
 	<obj-relationship name="meanigfulFKs" source="RelationshipHelper" target="MeaningfulFK" db-relationship-path="meanigfulFKs"/>
 	<obj-relationship name="reflexiveAndToOneArray" source="RelationshipHelper" target="ReflexiveAndToOne" db-relationship-path="reflexiveAndToOneArray"/>
+	<obj-relationship name="targets" source="SetToMany" target="SetToManyTarget" collection-type="java.util.Set" db-relationship-path="targets"/>
+	<obj-relationship name="setToMany" source="SetToManyTarget" target="SetToMany" db-relationship-path="setToMany"/>
 	<obj-relationship name="root" source="ToManyFkDep" target="ToManyFkRoot" db-relationship-path="root"/>
 	<obj-relationship name="root2" source="ToManyFkDep" target="ToManyRoot2" db-relationship-path="root2"/>
 	<obj-relationship name="deps" source="ToManyFkRoot" target="ToManyFkDep" db-relationship-path="deps"/>

Modified: cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/resources/testmap.map.xml
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/resources/testmap.map.xml?rev=568117&r1=568116&r2=568117&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/resources/testmap.map.xml (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/test/resources/testmap.map.xml Tue Aug 21 06:26:38 2007
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<data-map project-version="2.0">
+<data-map project-version="3.0">
 	<property name="defaultPackage" value="org.apache.art"/>
 	<procedure name="cayenne_tst_out_proc">
 		<procedure-parameter name="in_param" type="INTEGER" direction="in"/>



Mime
View raw message