cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r928478 - in /cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test: java/org/apache/art/ java/org/apache/art/auto/ java/org/apache/cayenne/access/ resources/
Date Sun, 28 Mar 2010 19:12:31 GMT
Author: aadamchik
Date: Sun Mar 28 19:12:30 2010
New Revision: 928478

URL: http://svn.apache.org/viewvc?rev=928478&view=rev
Log:
CAY-1409 Pkgenerator is accessed needlessly for join tables with own database generated PK

a unit test that shows Cayenne working correctly, still used for debugging unneeded PkGenerator access

Added:
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/art/GeneratedF1.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/art/GeneratedF2.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/art/auto/_GeneratedF1.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/art/auto/_GeneratedF2.java
Modified:
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/art/auto/_Testmap.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/IdentityColumnsTest.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/cayenne-default.xml
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/embeddable.map.xml
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/inheritance-flat.map.xml
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/inheritance.map.xml
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/qualified.map.xml
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/quotemap.map.xml
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/sus-map.map.xml
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/testmap.map.xml

Added: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/art/GeneratedF1.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/art/GeneratedF1.java?rev=928478&view=auto
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/art/GeneratedF1.java (added)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/art/GeneratedF1.java Sun Mar 28 19:12:30 2010
@@ -0,0 +1,7 @@
+package org.apache.art;
+
+import org.apache.art.auto._GeneratedF1;
+
+public class GeneratedF1 extends _GeneratedF1 {
+
+}

Added: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/art/GeneratedF2.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/art/GeneratedF2.java?rev=928478&view=auto
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/art/GeneratedF2.java (added)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/art/GeneratedF2.java Sun Mar 28 19:12:30 2010
@@ -0,0 +1,7 @@
+package org.apache.art;
+
+import org.apache.art.auto._GeneratedF2;
+
+public class GeneratedF2 extends _GeneratedF2 {
+
+}

Added: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/art/auto/_GeneratedF1.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/art/auto/_GeneratedF1.java?rev=928478&view=auto
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/art/auto/_GeneratedF1.java (added)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/art/auto/_GeneratedF1.java Sun Mar 28 19:12:30 2010
@@ -0,0 +1,32 @@
+package org.apache.art.auto;
+
+import java.util.List;
+
+import org.apache.art.GeneratedF2;
+import org.apache.cayenne.CayenneDataObject;
+
+/**
+ * Class _GeneratedF1 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 abstract class _GeneratedF1 extends CayenneDataObject {
+
+    public static final String F2_PROPERTY = "f2";
+
+    public static final String ID_PK_COLUMN = "ID";
+
+    public void addToF2(GeneratedF2 obj) {
+        addToManyTarget("f2", obj, true);
+    }
+    public void removeFromF2(GeneratedF2 obj) {
+        removeToManyTarget("f2", obj, true);
+    }
+    @SuppressWarnings("unchecked")
+    public List<GeneratedF2> getF2() {
+        return (List<GeneratedF2>)readProperty("f2");
+    }
+
+
+}

Added: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/art/auto/_GeneratedF2.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/art/auto/_GeneratedF2.java?rev=928478&view=auto
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/art/auto/_GeneratedF2.java (added)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/art/auto/_GeneratedF2.java Sun Mar 28 19:12:30 2010
@@ -0,0 +1,32 @@
+package org.apache.art.auto;
+
+import java.util.List;
+
+import org.apache.art.GeneratedF1;
+import org.apache.cayenne.CayenneDataObject;
+
+/**
+ * Class _GeneratedF2 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 abstract class _GeneratedF2 extends CayenneDataObject {
+
+    public static final String F1_PROPERTY = "f1";
+
+    public static final String ID_PK_COLUMN = "ID";
+
+    public void addToF1(GeneratedF1 obj) {
+        addToManyTarget("f1", obj, true);
+    }
+    public void removeFromF1(GeneratedF1 obj) {
+        removeToManyTarget("f1", obj, true);
+    }
+    @SuppressWarnings("unchecked")
+    public List<GeneratedF1> getF1() {
+        return (List<GeneratedF1>)readProperty("f1");
+    }
+
+
+}

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/art/auto/_Testmap.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/art/auto/_Testmap.java?rev=928478&r1=928477&r2=928478&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/art/auto/_Testmap.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/art/auto/_Testmap.java Sun Mar 28 19:12:30 2010
@@ -16,6 +16,40 @@ import org.apache.cayenne.query.NamedQue
  */
 public class _Testmap {
 
+    public static final String EJBQL_QUERY_TEST_QUERYNAME = "EjbqlQueryTest";
+
+    public static final String NON_SELECTING_QUERY_QUERYNAME = "NonSelectingQuery";
+
+    public static final String OBJECT_QUERY_QUERYNAME = "ObjectQuery";
+
+    public static final String PARAMETERIZED_NON_SELECTING_QUERY_QUERYNAME = "ParameterizedNonSelectingQuery";
+
+    public static final String PARAMETERIZED_QUERY_WITH_LOCAL_CACHE_QUERYNAME = "ParameterizedQueryWithLocalCache";
+
+    public static final String PARAMETERIZED_QUERY_WITH_SHARED_CACHE_QUERYNAME = "ParameterizedQueryWithSharedCache";
+
+    public static final String PROCEDURE_QUERY_QUERYNAME = "ProcedureQuery";
+
+    public static final String QUERY_WITH_LOCAL_CACHE_QUERYNAME = "QueryWithLocalCache";
+
+    public static final String QUERY_WITH_ORDERING_QUERYNAME = "QueryWithOrdering";
+
+    public static final String QUERY_WITH_PREFETCH_QUERYNAME = "QueryWithPrefetch";
+
+    public static final String QUERY_WITH_QUALIFIER_QUERYNAME = "QueryWithQualifier";
+
+    public static final String QUERY_WITH_SHARED_CACHE_QUERYNAME = "QueryWithSharedCache";
+
+    public static final String SELECT_DATE_TEST_QUERYNAME = "SelectDateTest";
+
+    public static final String SELECT_RETURN_TYPES_MAP1_QUERYNAME = "SelectReturnTypesMap1";
+
+    public static final String SELECT_RETURN_TYPES_MAP2_QUERYNAME = "SelectReturnTypesMap2";
+
+    public static final String SELECT_TEST_LOWER_QUERYNAME = "SelectTestLower";
+
+    public static final String SELECT_TEST_UPPER_QUERYNAME = "SelectTestUpper";
+
     public List<Painting> performObjectQuery(ObjectContext context , Artist artist) {
         String[] parameters = {
             "artist",
@@ -79,4 +113,4 @@ public class _Testmap {
     public List<Artist> performQueryWithSharedCache(ObjectContext context ) {
         return context.performQuery(new NamedQuery("QueryWithSharedCache"));
     }
-}
+}
\ No newline at end of file

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/IdentityColumnsTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/IdentityColumnsTest.java?rev=928478&r1=928477&r2=928478&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/IdentityColumnsTest.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/IdentityColumnsTest.java Sun Mar 28 19:12:30 2010
@@ -28,10 +28,15 @@ import org.apache.art.GeneratedColumnCom
 import org.apache.art.GeneratedColumnDep;
 import org.apache.art.GeneratedColumnTest2;
 import org.apache.art.GeneratedColumnTestEntity;
+import org.apache.art.GeneratedF1;
+import org.apache.art.GeneratedF2;
 import org.apache.cayenne.Cayenne;
 import org.apache.cayenne.ObjectId;
 import org.apache.cayenne.Persistent;
+import org.apache.cayenne.map.DbAttribute;
+import org.apache.cayenne.map.DbEntity;
 import org.apache.cayenne.query.SelectQuery;
+import org.apache.cayenne.test.TableHelper;
 import org.apache.cayenne.unit.CayenneCase;
 
 /**
@@ -86,24 +91,61 @@ public class IdentityColumnsTest extends
 
         // make sure that id is the same as id in the DB
         context.invalidateObjects(Collections.singleton(idObject));
-        GeneratedColumnTestEntity object = Cayenne
-                .objectForPK(context, GeneratedColumnTestEntity.class, id);
+        GeneratedColumnTestEntity object = Cayenne.objectForPK(
+                context,
+                GeneratedColumnTestEntity.class,
+                id);
         assertNotNull(object);
         assertEquals(name, object.getName());
     }
 
+    public void testGeneratedJoinInFlattenedRelationship() throws Exception {
+        String joinTableName = "GENERATED_JOIN";
+
+        TableHelper joinTable = new TableHelper(getDbHelper(), joinTableName);
+        joinTable.deleteAll();
+
+        DataContext context = createDataContext();
+
+        // before saving objects, let's manually access PKGenerator to get a base PK value
+        // for comparison
+        DbEntity joinTableEntity = context.getEntityResolver().getDbEntity(joinTableName);
+        DbAttribute pkAttribute = (DbAttribute) joinTableEntity.getAttribute("ID");
+        Number pk = (Number) getNode().getAdapter().getPkGenerator().generatePk(
+                getNode(),
+                pkAttribute);
+
+        GeneratedF1 f1 = context.newObject(GeneratedF1.class);
+        GeneratedF2 f2 = context.newObject(GeneratedF2.class);
+        f1.addToF2(f2);
+
+        context.commitChanges();
+
+        int id = joinTable.getInt("ID");
+        assertTrue(id > 0);
+
+        // this is a leap of faith that autoincrement-based IDs will not match
+        // PkGenertor provided ids... This sorta works though if pk generator has a 200
+        // base value
+        if (getNode().getAdapter().supportsGeneratedKeys()) {
+            assertFalse("Looks like auto-increment wasn't used for the join table. ID: "
+                    + id, id == pk.intValue() + 1);
+        }
+        else {
+            assertEquals(id, pk.intValue() + 1);
+        }
+    }
+
     /**
      * Tests CAY-422 bug.
      */
     public void testUnrelatedUpdate() throws Exception {
         DataContext context = createDataContext();
-        GeneratedColumnTestEntity m = context
-                .newObject(GeneratedColumnTestEntity.class);
+        GeneratedColumnTestEntity m = context.newObject(GeneratedColumnTestEntity.class);
 
         m.setName("m");
 
-        GeneratedColumnDep d = context
-                .newObject(GeneratedColumnDep.class);
+        GeneratedColumnDep d = context.newObject(GeneratedColumnDep.class);
         d.setName("d");
         d.setToMaster(m);
         context.commitChanges();
@@ -130,8 +172,7 @@ public class IdentityColumnsTest extends
                 .newObject(GeneratedColumnTestEntity.class);
         idObject1.setName("o1");
 
-        GeneratedColumnTest2 idObject2 = context
-                .newObject(GeneratedColumnTest2.class);
+        GeneratedColumnTest2 idObject2 = context.newObject(GeneratedColumnTest2.class);
         idObject2.setName("o2");
 
         context.commitChanges();
@@ -146,12 +187,9 @@ public class IdentityColumnsTest extends
         };
 
         GeneratedColumnTestEntity[] idObjects = new GeneratedColumnTestEntity[] {
-                context
-                        .newObject(GeneratedColumnTestEntity.class),
-                context
-                        .newObject(GeneratedColumnTestEntity.class),
-                context
-                        .newObject(GeneratedColumnTestEntity.class)
+                context.newObject(GeneratedColumnTestEntity.class),
+                context.newObject(GeneratedColumnTestEntity.class),
+                context.newObject(GeneratedColumnTestEntity.class)
         };
 
         for (int i = 0; i < idObjects.length; i++) {
@@ -169,8 +207,10 @@ public class IdentityColumnsTest extends
         context.invalidateObjects(Arrays.asList(idObjects));
 
         for (int i = 0; i < ids.length; i++) {
-            GeneratedColumnTestEntity object = Cayenne
-                    .objectForPK(context, GeneratedColumnTestEntity.class, ids[i]);
+            GeneratedColumnTestEntity object = Cayenne.objectForPK(
+                    context,
+                    GeneratedColumnTestEntity.class,
+                    ids[i]);
             assertNotNull(object);
             assertEquals(names[i], object.getName());
         }
@@ -190,13 +230,11 @@ public class IdentityColumnsTest extends
                     .newObject(GeneratedColumnCompMaster.class);
             master.setName(masterName);
 
-            GeneratedColumnCompKey dep1 = context
-                    .newObject(GeneratedColumnCompKey.class);
+            GeneratedColumnCompKey dep1 = context.newObject(GeneratedColumnCompKey.class);
             dep1.setName(depName1);
             dep1.setToMaster(master);
 
-            GeneratedColumnCompKey dep2 = context
-                    .newObject(GeneratedColumnCompKey.class);
+            GeneratedColumnCompKey dep2 = context.newObject(GeneratedColumnCompKey.class);
             dep2.setName(depName2);
             dep2.setToMaster(master);
 
@@ -235,8 +273,7 @@ public class IdentityColumnsTest extends
                 .newObject(GeneratedColumnTestEntity.class);
         master1.setName("aaa");
 
-        GeneratedColumnDep dependent = context
-                .newObject(GeneratedColumnDep.class);
+        GeneratedColumnDep dependent = context.newObject(GeneratedColumnDep.class);
         dependent.setName("aaa");
         dependent.setToMaster(master1);
 
@@ -260,10 +297,7 @@ public class IdentityColumnsTest extends
 
         context.invalidateObjects(Arrays.asList(master2, dependent));
 
-        assertNotNull(Cayenne.objectForPK(
-                context,
-                GeneratedColumnTestEntity.class,
-                id1));
+        assertNotNull(Cayenne.objectForPK(context, GeneratedColumnTestEntity.class, id1));
         assertNotNull(Cayenne.objectForPK(context, GeneratedColumnDep.class, id2));
     }
 
@@ -279,9 +313,8 @@ public class IdentityColumnsTest extends
                 .newObject(GeneratedColumnTestEntity.class);
         idObject.setName("aaa");
 
-        GeneratedColumnDep dependent = idObject
-                .getObjectContext()
-                .newObject(GeneratedColumnDep.class);
+        GeneratedColumnDep dependent = idObject.getObjectContext().newObject(
+                GeneratedColumnDep.class);
         dependent.setName("aaa");
         dependent.setToMaster(idObject);
 
@@ -299,10 +332,7 @@ public class IdentityColumnsTest extends
         // refetch from DB
         context.invalidateObjects(Arrays.asList(idObject, dependent));
 
-        assertNotNull(Cayenne.objectForPK(
-                context,
-                GeneratedColumnTestEntity.class,
-                id1));
+        assertNotNull(Cayenne.objectForPK(context, GeneratedColumnTestEntity.class, id1));
         assertNotNull(Cayenne.objectForPK(context, GeneratedColumnDep.class, id2));
     }
 }

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/cayenne-default.xml
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/cayenne-default.xml?rev=928478&r1=928477&r2=928478&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/cayenne-default.xml (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/cayenne-default.xml Sun Mar 28 19:12:30 2010
@@ -1,17 +1,17 @@
-<?xml version="1.0" encoding="utf-8"?>
-<domain project-version="6">
-	<map name="embeddable"/>
-	<map name="generic"/>
-	<map name="inheritance"/>
-	<map name="inheritance-flat"/>
-	<map name="locking"/>
-	<map name="map-db1"/>
-	<map name="map-db2"/>
-	<map name="multi-tier"/>
-	<map name="people"/>
-	<map name="qualified"/>
-	<map name="quotemap"/>
-	<map name="relationships"/>
-	<map name="sus-map"/>
-	<map name="testmap"/>
-</domain>
+<?xml version="1.0" encoding="utf-8"?>
+<domain project-version="6">
+	<map name="embeddable"/>
+	<map name="generic"/>
+	<map name="inheritance"/>
+	<map name="inheritance-flat"/>
+	<map name="locking"/>
+	<map name="map-db1"/>
+	<map name="map-db2"/>
+	<map name="multi-tier"/>
+	<map name="people"/>
+	<map name="qualified"/>
+	<map name="quotemap"/>
+	<map name="relationships"/>
+	<map name="sus-map"/>
+	<map name="testmap"/>
+</domain>

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/embeddable.map.xml
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/embeddable.map.xml?rev=928478&r1=928477&r2=928478&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/embeddable.map.xml (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/embeddable.map.xml Sun Mar 28 19:12:30 2010
@@ -1,27 +1,27 @@
-<?xml version="1.0" encoding="utf-8"?>
-<data-map xmlns="http://cayenne.apache.org/schema/3.0/modelMap"
-	 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	 xsi:schemaLocation="http://cayenne.apache.org/schema/3.0/modelMap http://cayenne.apache.org/schema/3.0/modelMap.xsd"
-	 project-version="6">
-	<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"/>
-		<embeddable-attribute name="embedded20" type="java.lang.String" db-attribute-name="EMBEDDED20"/>
-	</embeddable>
-	<db-entity name="EMBED_ENTITY1">
-		<db-attribute name="EMBEDDED10" type="VARCHAR" length="100"/>
-		<db-attribute name="EMBEDDED20" type="VARCHAR" length="100"/>
-		<db-attribute name="EMBEDDED30" type="VARCHAR" length="100"/>
-		<db-attribute name="EMBEDDED40" type="VARCHAR" length="100"/>
-		<db-attribute name="ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
-		<db-attribute name="NAME" type="VARCHAR" length="100"/>
-	</db-entity>
-	<obj-entity name="EmbedEntity1" className="org.apache.cayenne.testdo.embeddable.EmbedEntity1" dbEntityName="EMBED_ENTITY1">
-		<embedded-attribute name="embedded1" type="org.apache.cayenne.testdo.embeddable.Embeddable1"/>
-		<embedded-attribute name="embedded2" type="org.apache.cayenne.testdo.embeddable.Embeddable1">
-			<embeddable-attribute-override name="embedded10" db-attribute-path="EMBEDDED30"/>
-			<embeddable-attribute-override name="embedded20" db-attribute-path="EMBEDDED40"/>
-		</embedded-attribute>
-		<obj-attribute name="name" type="java.lang.String" db-attribute-path="NAME"/>
-	</obj-entity>
-</data-map>
+<?xml version="1.0" encoding="utf-8"?>
+<data-map xmlns="http://cayenne.apache.org/schema/3.0/modelMap"
+	 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	 xsi:schemaLocation="http://cayenne.apache.org/schema/3.0/modelMap http://cayenne.apache.org/schema/3.0/modelMap.xsd"
+	 project-version="6">
+	<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"/>
+		<embeddable-attribute name="embedded20" type="java.lang.String" db-attribute-name="EMBEDDED20"/>
+	</embeddable>
+	<db-entity name="EMBED_ENTITY1">
+		<db-attribute name="EMBEDDED10" type="VARCHAR" length="100"/>
+		<db-attribute name="EMBEDDED20" type="VARCHAR" length="100"/>
+		<db-attribute name="EMBEDDED30" type="VARCHAR" length="100"/>
+		<db-attribute name="EMBEDDED40" type="VARCHAR" length="100"/>
+		<db-attribute name="ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
+		<db-attribute name="NAME" type="VARCHAR" length="100"/>
+	</db-entity>
+	<obj-entity name="EmbedEntity1" className="org.apache.cayenne.testdo.embeddable.EmbedEntity1" dbEntityName="EMBED_ENTITY1">
+		<embedded-attribute name="embedded1" type="org.apache.cayenne.testdo.embeddable.Embeddable1"/>
+		<embedded-attribute name="embedded2" type="org.apache.cayenne.testdo.embeddable.Embeddable1">
+			<embeddable-attribute-override name="embedded10" db-attribute-path="EMBEDDED30"/>
+			<embeddable-attribute-override name="embedded20" db-attribute-path="EMBEDDED40"/>
+		</embedded-attribute>
+		<obj-attribute name="name" type="java.lang.String" db-attribute-path="NAME"/>
+	</obj-entity>
+</data-map>

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/inheritance-flat.map.xml
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/inheritance-flat.map.xml?rev=928478&r1=928477&r2=928478&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/inheritance-flat.map.xml (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/inheritance-flat.map.xml Sun Mar 28 19:12:30 2010
@@ -1,80 +1,80 @@
-<?xml version="1.0" encoding="utf-8"?>
-<data-map xmlns="http://cayenne.apache.org/schema/3.0/modelMap"
-	 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	 xsi:schemaLocation="http://cayenne.apache.org/schema/3.0/modelMap http://cayenne.apache.org/schema/3.0/modelMap.xsd"
-	 project-version="6">
-	<property name="defaultPackage" value="org.apache.cayenne.testdo.inheritance_flat"/>
-	<db-entity name="GroupMembers">
-		<db-attribute name="group_id" type="BIGINT" isMandatory="true"/>
-		<db-attribute name="id" type="BIGINT" isPrimaryKey="true" isMandatory="true"/>
-		<db-attribute name="role_id" type="BIGINT" isMandatory="true"/>
-	</db-entity>
-	<db-entity name="GroupProperties">
-		<db-attribute name="description" type="VARCHAR" length="100"/>
-		<db-attribute name="id" type="BIGINT" isPrimaryKey="true" isMandatory="true"/>
-	</db-entity>
-	<db-entity name="Roles">
-		<db-attribute name="id" type="BIGINT" isPrimaryKey="true" isMandatory="true"/>
-		<db-attribute name="name" type="VARCHAR" isMandatory="true" length="32"/>
-		<db-attribute name="type" type="SMALLINT" isMandatory="true"/>
-	</db-entity>
-	<db-entity name="UserProperties">
-		<db-attribute name="id" type="BIGINT" isPrimaryKey="true" isMandatory="true"/>
-		<db-attribute name="nickname" type="VARCHAR" length="32"/>
-	</db-entity>
-	<obj-entity name="Group" superEntityName="User" className="org.apache.cayenne.testdo.inheritance_flat.Group">
-		<qualifier><![CDATA[type = 2]]></qualifier>
-	</obj-entity>
-	<obj-entity name="GroupProperties" className="org.apache.cayenne.testdo.inheritance_flat.GroupProperties" dbEntityName="GroupProperties">
-		<obj-attribute name="description" type="java.lang.String" db-attribute-path="description"/>
-		<obj-attribute name="id" type="java.lang.Long" db-attribute-path="id"/>
-	</obj-entity>
-	<obj-entity name="Role" className="org.apache.cayenne.testdo.inheritance_flat.Role" dbEntityName="Roles">
-		<qualifier><![CDATA[type = 0]]></qualifier>
-		<obj-attribute name="id" type="long" db-attribute-path="id"/>
-		<obj-attribute name="name" type="java.lang.String" lock="true" db-attribute-path="name"/>
-		<obj-attribute name="type" type="int" db-attribute-path="type"/>
-		<post-persist method-name="onPostPersist"/>
-		<post-update method-name="onPostUpdate"/>
-	</obj-entity>
-	<obj-entity name="User" superEntityName="Role" className="org.apache.cayenne.testdo.inheritance_flat.User">
-		<qualifier><![CDATA[type = 1]]></qualifier>
-		<attribute-override name="id" db-attribute-path="id"/>
-		<attribute-override name="name" db-attribute-path="name"/>
-		<attribute-override name="type" db-attribute-path="type"/>
-	</obj-entity>
-	<obj-entity name="UserProperties" className="org.apache.cayenne.testdo.inheritance_flat.UserProperties" dbEntityName="UserProperties">
-		<obj-attribute name="id" type="java.lang.Long" db-attribute-path="id"/>
-		<obj-attribute name="nickname" type="java.lang.String" db-attribute-path="nickname"/>
-	</obj-entity>
-	<db-relationship name="group" source="GroupMembers" target="Roles" toMany="false">
-		<db-attribute-pair source="group_id" target="id"/>
-	</db-relationship>
-	<db-relationship name="role" source="GroupMembers" target="Roles" toMany="false">
-		<db-attribute-pair source="role_id" target="id"/>
-	</db-relationship>
-	<db-relationship name="group" source="GroupProperties" target="Roles" toMany="false">
-		<db-attribute-pair source="id" target="id"/>
-	</db-relationship>
-	<db-relationship name="group_members" source="Roles" target="GroupMembers" toMany="true">
-		<db-attribute-pair source="id" target="group_id"/>
-	</db-relationship>
-	<db-relationship name="group_properties" source="Roles" target="GroupProperties" toDependentPK="true" toMany="false">
-		<db-attribute-pair source="id" target="id"/>
-	</db-relationship>
-	<db-relationship name="role_groups" source="Roles" target="GroupMembers" toMany="true">
-		<db-attribute-pair source="id" target="role_id"/>
-	</db-relationship>
-	<db-relationship name="user_properties" source="Roles" target="UserProperties" toDependentPK="true" toMany="false">
-		<db-attribute-pair source="id" target="id"/>
-	</db-relationship>
-	<db-relationship name="user" source="UserProperties" target="Roles" toMany="false">
-		<db-attribute-pair source="id" target="id"/>
-	</db-relationship>
-	<obj-relationship name="groupMembers" source="Group" target="Role" deleteRule="Nullify" db-relationship-path="group_members.role"/>
-	<obj-relationship name="groupProperties" source="Group" target="GroupProperties" deleteRule="Cascade" db-relationship-path="group_properties"/>
-	<obj-relationship name="group" source="GroupProperties" target="Group" deleteRule="Nullify" db-relationship-path="group"/>
-	<obj-relationship name="roleGroups" source="Role" target="Group" deleteRule="Nullify" db-relationship-path="role_groups.group"/>
-	<obj-relationship name="userProperties" source="User" target="UserProperties" deleteRule="Cascade" db-relationship-path="user_properties"/>
-	<obj-relationship name="user" source="UserProperties" target="User" deleteRule="Nullify" db-relationship-path="user"/>
-</data-map>
+<?xml version="1.0" encoding="utf-8"?>
+<data-map xmlns="http://cayenne.apache.org/schema/3.0/modelMap"
+	 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	 xsi:schemaLocation="http://cayenne.apache.org/schema/3.0/modelMap http://cayenne.apache.org/schema/3.0/modelMap.xsd"
+	 project-version="6">
+	<property name="defaultPackage" value="org.apache.cayenne.testdo.inheritance_flat"/>
+	<db-entity name="GroupMembers">
+		<db-attribute name="group_id" type="BIGINT" isMandatory="true"/>
+		<db-attribute name="id" type="BIGINT" isPrimaryKey="true" isMandatory="true"/>
+		<db-attribute name="role_id" type="BIGINT" isMandatory="true"/>
+	</db-entity>
+	<db-entity name="GroupProperties">
+		<db-attribute name="description" type="VARCHAR" length="100"/>
+		<db-attribute name="id" type="BIGINT" isPrimaryKey="true" isMandatory="true"/>
+	</db-entity>
+	<db-entity name="Roles">
+		<db-attribute name="id" type="BIGINT" isPrimaryKey="true" isMandatory="true"/>
+		<db-attribute name="name" type="VARCHAR" isMandatory="true" length="32"/>
+		<db-attribute name="type" type="SMALLINT" isMandatory="true"/>
+	</db-entity>
+	<db-entity name="UserProperties">
+		<db-attribute name="id" type="BIGINT" isPrimaryKey="true" isMandatory="true"/>
+		<db-attribute name="nickname" type="VARCHAR" length="32"/>
+	</db-entity>
+	<obj-entity name="Group" superEntityName="User" className="org.apache.cayenne.testdo.inheritance_flat.Group">
+		<qualifier><![CDATA[type = 2]]></qualifier>
+	</obj-entity>
+	<obj-entity name="GroupProperties" className="org.apache.cayenne.testdo.inheritance_flat.GroupProperties" dbEntityName="GroupProperties">
+		<obj-attribute name="description" type="java.lang.String" db-attribute-path="description"/>
+		<obj-attribute name="id" type="java.lang.Long" db-attribute-path="id"/>
+	</obj-entity>
+	<obj-entity name="Role" className="org.apache.cayenne.testdo.inheritance_flat.Role" dbEntityName="Roles">
+		<qualifier><![CDATA[type = 0]]></qualifier>
+		<obj-attribute name="id" type="long" db-attribute-path="id"/>
+		<obj-attribute name="name" type="java.lang.String" lock="true" db-attribute-path="name"/>
+		<obj-attribute name="type" type="int" db-attribute-path="type"/>
+		<post-persist method-name="onPostPersist"/>
+		<post-update method-name="onPostUpdate"/>
+	</obj-entity>
+	<obj-entity name="User" superEntityName="Role" className="org.apache.cayenne.testdo.inheritance_flat.User">
+		<qualifier><![CDATA[type = 1]]></qualifier>
+		<attribute-override name="id" db-attribute-path="id"/>
+		<attribute-override name="name" db-attribute-path="name"/>
+		<attribute-override name="type" db-attribute-path="type"/>
+	</obj-entity>
+	<obj-entity name="UserProperties" className="org.apache.cayenne.testdo.inheritance_flat.UserProperties" dbEntityName="UserProperties">
+		<obj-attribute name="id" type="java.lang.Long" db-attribute-path="id"/>
+		<obj-attribute name="nickname" type="java.lang.String" db-attribute-path="nickname"/>
+	</obj-entity>
+	<db-relationship name="group" source="GroupMembers" target="Roles" toMany="false">
+		<db-attribute-pair source="group_id" target="id"/>
+	</db-relationship>
+	<db-relationship name="role" source="GroupMembers" target="Roles" toMany="false">
+		<db-attribute-pair source="role_id" target="id"/>
+	</db-relationship>
+	<db-relationship name="group" source="GroupProperties" target="Roles" toMany="false">
+		<db-attribute-pair source="id" target="id"/>
+	</db-relationship>
+	<db-relationship name="group_members" source="Roles" target="GroupMembers" toMany="true">
+		<db-attribute-pair source="id" target="group_id"/>
+	</db-relationship>
+	<db-relationship name="group_properties" source="Roles" target="GroupProperties" toDependentPK="true" toMany="false">
+		<db-attribute-pair source="id" target="id"/>
+	</db-relationship>
+	<db-relationship name="role_groups" source="Roles" target="GroupMembers" toMany="true">
+		<db-attribute-pair source="id" target="role_id"/>
+	</db-relationship>
+	<db-relationship name="user_properties" source="Roles" target="UserProperties" toDependentPK="true" toMany="false">
+		<db-attribute-pair source="id" target="id"/>
+	</db-relationship>
+	<db-relationship name="user" source="UserProperties" target="Roles" toMany="false">
+		<db-attribute-pair source="id" target="id"/>
+	</db-relationship>
+	<obj-relationship name="groupMembers" source="Group" target="Role" deleteRule="Nullify" db-relationship-path="group_members.role"/>
+	<obj-relationship name="groupProperties" source="Group" target="GroupProperties" deleteRule="Cascade" db-relationship-path="group_properties"/>
+	<obj-relationship name="group" source="GroupProperties" target="Group" deleteRule="Nullify" db-relationship-path="group"/>
+	<obj-relationship name="roleGroups" source="Role" target="Group" deleteRule="Nullify" db-relationship-path="role_groups.group"/>
+	<obj-relationship name="userProperties" source="User" target="UserProperties" deleteRule="Cascade" db-relationship-path="user_properties"/>
+	<obj-relationship name="user" source="UserProperties" target="User" deleteRule="Nullify" db-relationship-path="user"/>
+</data-map>

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/inheritance.map.xml
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/inheritance.map.xml?rev=928478&r1=928477&r2=928478&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/inheritance.map.xml (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/inheritance.map.xml Sun Mar 28 19:12:30 2010
@@ -1,41 +1,41 @@
-<?xml version="1.0" encoding="utf-8"?>
-<data-map xmlns="http://cayenne.apache.org/schema/3.0/modelMap"
-	 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	 xsi:schemaLocation="http://cayenne.apache.org/schema/3.0/modelMap http://cayenne.apache.org/schema/3.0/modelMap.xsd"
-	 project-version="6">
-	<property name="defaultPackage" value="org.apache.cayenne.testdo.horizontalinherit"/>
-	<db-entity name="INHERITANCE_SUB_ENTITY1">
-		<db-attribute name="ID" type="BIGINT" isPrimaryKey="true" isMandatory="true"/>
-		<db-attribute name="SUBENTITY_STRING_DB_ATTR" type="VARCHAR" length="255"/>
-		<db-attribute name="SUPER_INT_DB_ATTR" type="INTEGER"/>
-		<db-attribute name="SUPER_STRING_DB_ATTR" type="VARCHAR" length="255"/>
-	</db-entity>
-	<db-entity name="INHERITANCE_SUB_ENTITY2">
-		<db-attribute name="ID" type="BIGINT" isPrimaryKey="true" isMandatory="true"/>
-		<db-attribute name="OVERRIDDEN_STRING_DB_ATTR" type="VARCHAR" length="255"/>
-		<db-attribute name="SUBENTITY_INT_DB_ATTR" type="INTEGER"/>
-		<db-attribute name="SUPER_INT_DB_ATTR" type="INTEGER"/>
-	</db-entity>
-	<db-entity name="INHERITANCE_SUB_ENTITY3">
-		<db-attribute name="ID" type="BIGINT" isPrimaryKey="true" isMandatory="true"/>
-		<db-attribute name="OVERRIDDEN_INT_DB_ATTR" type="INTEGER"/>
-		<db-attribute name="OVERRIDDEN_STRING_DB_ATTR" type="VARCHAR" length="255"/>
-		<db-attribute name="SUBENTITY_BOOL_ATTR" type="BIT"/>
-	</db-entity>
-	<obj-entity name="AbstractSuperEntity" abstract="true" className="org.apache.cayenne.testdo.horizontalinherit.AbstractSuperEntity">
-		<obj-attribute name="superIntAttr" type="int" db-attribute-path="SUPER_INT_DB_ATTR"/>
-		<obj-attribute name="superStringAttr" type="java.lang.String" db-attribute-path="SUPER_STRING_DB_ATTR"/>
-	</obj-entity>
-	<obj-entity name="SubEntity1" superEntityName="AbstractSuperEntity" className="org.apache.cayenne.testdo.horizontalinherit.SubEntity1" dbEntityName="INHERITANCE_SUB_ENTITY1">
-		<obj-attribute name="subEntityStringAttr" type="java.lang.String" db-attribute-path="SUBENTITY_STRING_DB_ATTR"/>
-	</obj-entity>
-	<obj-entity name="SubEntity2" superEntityName="AbstractSuperEntity" className="org.apache.cayenne.testdo.horizontalinherit.SubEntity2" dbEntityName="INHERITANCE_SUB_ENTITY2">
-		<obj-attribute name="subEntityIntAttr" type="int" db-attribute-path="SUBENTITY_INT_DB_ATTR"/>
-		<attribute-override name="superStringAttr" db-attribute-path="OVERRIDDEN_STRING_DB_ATTR"/>
-	</obj-entity>
-	<obj-entity name="SubEntity3" superEntityName="AbstractSuperEntity" className="org.apache.cayenne.testdo.horizontalinherit.SubEntity3" dbEntityName="INHERITANCE_SUB_ENTITY3">
-		<obj-attribute name="subBooleanAttr" type="boolean" db-attribute-path="SUBENTITY_BOOL_ATTR"/>
-		<attribute-override name="superIntAttr" db-attribute-path="OVERRIDDEN_INT_DB_ATTR"/>
-		<attribute-override name="superStringAttr" db-attribute-path="OVERRIDDEN_STRING_DB_ATTR"/>
-	</obj-entity>
-</data-map>
+<?xml version="1.0" encoding="utf-8"?>
+<data-map xmlns="http://cayenne.apache.org/schema/3.0/modelMap"
+	 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	 xsi:schemaLocation="http://cayenne.apache.org/schema/3.0/modelMap http://cayenne.apache.org/schema/3.0/modelMap.xsd"
+	 project-version="6">
+	<property name="defaultPackage" value="org.apache.cayenne.testdo.horizontalinherit"/>
+	<db-entity name="INHERITANCE_SUB_ENTITY1">
+		<db-attribute name="ID" type="BIGINT" isPrimaryKey="true" isMandatory="true"/>
+		<db-attribute name="SUBENTITY_STRING_DB_ATTR" type="VARCHAR" length="255"/>
+		<db-attribute name="SUPER_INT_DB_ATTR" type="INTEGER"/>
+		<db-attribute name="SUPER_STRING_DB_ATTR" type="VARCHAR" length="255"/>
+	</db-entity>
+	<db-entity name="INHERITANCE_SUB_ENTITY2">
+		<db-attribute name="ID" type="BIGINT" isPrimaryKey="true" isMandatory="true"/>
+		<db-attribute name="OVERRIDDEN_STRING_DB_ATTR" type="VARCHAR" length="255"/>
+		<db-attribute name="SUBENTITY_INT_DB_ATTR" type="INTEGER"/>
+		<db-attribute name="SUPER_INT_DB_ATTR" type="INTEGER"/>
+	</db-entity>
+	<db-entity name="INHERITANCE_SUB_ENTITY3">
+		<db-attribute name="ID" type="BIGINT" isPrimaryKey="true" isMandatory="true"/>
+		<db-attribute name="OVERRIDDEN_INT_DB_ATTR" type="INTEGER"/>
+		<db-attribute name="OVERRIDDEN_STRING_DB_ATTR" type="VARCHAR" length="255"/>
+		<db-attribute name="SUBENTITY_BOOL_ATTR" type="BIT"/>
+	</db-entity>
+	<obj-entity name="AbstractSuperEntity" abstract="true" className="org.apache.cayenne.testdo.horizontalinherit.AbstractSuperEntity">
+		<obj-attribute name="superIntAttr" type="int" db-attribute-path="SUPER_INT_DB_ATTR"/>
+		<obj-attribute name="superStringAttr" type="java.lang.String" db-attribute-path="SUPER_STRING_DB_ATTR"/>
+	</obj-entity>
+	<obj-entity name="SubEntity1" superEntityName="AbstractSuperEntity" className="org.apache.cayenne.testdo.horizontalinherit.SubEntity1" dbEntityName="INHERITANCE_SUB_ENTITY1">
+		<obj-attribute name="subEntityStringAttr" type="java.lang.String" db-attribute-path="SUBENTITY_STRING_DB_ATTR"/>
+	</obj-entity>
+	<obj-entity name="SubEntity2" superEntityName="AbstractSuperEntity" className="org.apache.cayenne.testdo.horizontalinherit.SubEntity2" dbEntityName="INHERITANCE_SUB_ENTITY2">
+		<obj-attribute name="subEntityIntAttr" type="int" db-attribute-path="SUBENTITY_INT_DB_ATTR"/>
+		<attribute-override name="superStringAttr" db-attribute-path="OVERRIDDEN_STRING_DB_ATTR"/>
+	</obj-entity>
+	<obj-entity name="SubEntity3" superEntityName="AbstractSuperEntity" className="org.apache.cayenne.testdo.horizontalinherit.SubEntity3" dbEntityName="INHERITANCE_SUB_ENTITY3">
+		<obj-attribute name="subBooleanAttr" type="boolean" db-attribute-path="SUBENTITY_BOOL_ATTR"/>
+		<attribute-override name="superIntAttr" db-attribute-path="OVERRIDDEN_INT_DB_ATTR"/>
+		<attribute-override name="superStringAttr" db-attribute-path="OVERRIDDEN_STRING_DB_ATTR"/>
+	</obj-entity>
+</data-map>

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/qualified.map.xml
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/qualified.map.xml?rev=928478&r1=928477&r2=928478&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/qualified.map.xml (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/qualified.map.xml Sun Mar 28 19:12:30 2010
@@ -1,36 +1,36 @@
-<?xml version="1.0" encoding="utf-8"?>
-<data-map xmlns="http://cayenne.apache.org/schema/3.0/modelMap"
-	 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	 xsi:schemaLocation="http://cayenne.apache.org/schema/3.0/modelMap http://cayenne.apache.org/schema/3.0/modelMap.xsd"
-	 project-version="6">
-	<property name="defaultPackage" value="org.apache.cayenne.testdo.qualified"/>
-	<db-entity name="QUALIFIED1">
-		<db-attribute name="DELETED" type="BOOLEAN"/>
-		<db-attribute name="ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
-		<db-attribute name="NAME" type="VARCHAR" length="200"/>
-	</db-entity>
-	<db-entity name="QUALIFIED2">
-		<db-attribute name="DELETED" type="BOOLEAN"/>
-		<db-attribute name="ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
-		<db-attribute name="NAME" type="VARCHAR" length="200"/>
-		<db-attribute name="QUALIFIED1_ID" type="INTEGER"/>
-	</db-entity>
-	<obj-entity name="Qualified1" className="org.apache.cayenne.testdo.qualified.Qualified1" dbEntityName="QUALIFIED1">
-		<qualifier><![CDATA[deleted = null]]></qualifier>
-		<obj-attribute name="deleted" type="java.lang.Boolean" db-attribute-path="DELETED"/>
-		<obj-attribute name="name" type="java.lang.String" db-attribute-path="NAME"/>
-	</obj-entity>
-	<obj-entity name="Qualified2" className="org.apache.cayenne.testdo.qualified.Qualified2" dbEntityName="QUALIFIED2">
-		<qualifier><![CDATA[deleted = null]]></qualifier>
-		<obj-attribute name="deleted" type="java.lang.Boolean" db-attribute-path="DELETED"/>
-		<obj-attribute name="name" type="java.lang.String" db-attribute-path="NAME"/>
-	</obj-entity>
-	<db-relationship name="qualified2s" source="QUALIFIED1" target="QUALIFIED2" toMany="true">
-		<db-attribute-pair source="ID" target="QUALIFIED1_ID"/>
-	</db-relationship>
-	<db-relationship name="qualified1" source="QUALIFIED2" target="QUALIFIED1" toMany="false">
-		<db-attribute-pair source="QUALIFIED1_ID" target="ID"/>
-	</db-relationship>
-	<obj-relationship name="qualified2s" source="Qualified1" target="Qualified2" db-relationship-path="qualified2s"/>
-	<obj-relationship name="qualified1" source="Qualified2" target="Qualified1" db-relationship-path="qualified1"/>
-</data-map>
+<?xml version="1.0" encoding="utf-8"?>
+<data-map xmlns="http://cayenne.apache.org/schema/3.0/modelMap"
+	 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	 xsi:schemaLocation="http://cayenne.apache.org/schema/3.0/modelMap http://cayenne.apache.org/schema/3.0/modelMap.xsd"
+	 project-version="6">
+	<property name="defaultPackage" value="org.apache.cayenne.testdo.qualified"/>
+	<db-entity name="QUALIFIED1">
+		<db-attribute name="DELETED" type="BOOLEAN"/>
+		<db-attribute name="ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
+		<db-attribute name="NAME" type="VARCHAR" length="200"/>
+	</db-entity>
+	<db-entity name="QUALIFIED2">
+		<db-attribute name="DELETED" type="BOOLEAN"/>
+		<db-attribute name="ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
+		<db-attribute name="NAME" type="VARCHAR" length="200"/>
+		<db-attribute name="QUALIFIED1_ID" type="INTEGER"/>
+	</db-entity>
+	<obj-entity name="Qualified1" className="org.apache.cayenne.testdo.qualified.Qualified1" dbEntityName="QUALIFIED1">
+		<qualifier><![CDATA[deleted = null]]></qualifier>
+		<obj-attribute name="deleted" type="java.lang.Boolean" db-attribute-path="DELETED"/>
+		<obj-attribute name="name" type="java.lang.String" db-attribute-path="NAME"/>
+	</obj-entity>
+	<obj-entity name="Qualified2" className="org.apache.cayenne.testdo.qualified.Qualified2" dbEntityName="QUALIFIED2">
+		<qualifier><![CDATA[deleted = null]]></qualifier>
+		<obj-attribute name="deleted" type="java.lang.Boolean" db-attribute-path="DELETED"/>
+		<obj-attribute name="name" type="java.lang.String" db-attribute-path="NAME"/>
+	</obj-entity>
+	<db-relationship name="qualified2s" source="QUALIFIED1" target="QUALIFIED2" toMany="true">
+		<db-attribute-pair source="ID" target="QUALIFIED1_ID"/>
+	</db-relationship>
+	<db-relationship name="qualified1" source="QUALIFIED2" target="QUALIFIED1" toMany="false">
+		<db-attribute-pair source="QUALIFIED1_ID" target="ID"/>
+	</db-relationship>
+	<obj-relationship name="qualified2s" source="Qualified1" target="Qualified2" db-relationship-path="qualified2s"/>
+	<obj-relationship name="qualified1" source="Qualified2" target="Qualified1" db-relationship-path="qualified1"/>
+</data-map>

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/quotemap.map.xml
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/quotemap.map.xml?rev=928478&r1=928477&r2=928478&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/quotemap.map.xml (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/quotemap.map.xml Sun Mar 28 19:12:30 2010
@@ -1,28 +1,28 @@
-<?xml version="1.0" encoding="utf-8"?>
-<data-map xmlns="http://cayenne.apache.org/schema/3.0/modelMap"
-	 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	 xsi:schemaLocation="http://cayenne.apache.org/schema/3.0/modelMap http://cayenne.apache.org/schema/3.0/modelMap.xsd"
-	 project-version="6">
-	<property name="defaultPackage" value="org.apache.cayenne.testdo.quotemap"/>
-	<property name="quoteSqlIdentifiers" value="true"/>
-	<db-entity name="QUOTE_ADRESS">
-		<db-attribute name="ADRES ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
-		<db-attribute name="City" type="VARCHAR" length="200"/>
-	</db-entity>
-	<db-entity name="quote Person">
-		<db-attribute name="DAte" type="DATE"/>
-		<db-attribute name="FULL name" type="VARCHAR" length="300"/>
-		<db-attribute name="NAME" type="VARCHAR" length="100"/>
-		<db-attribute name="id" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
-		<db-attribute name="salary" type="INTEGER"/>
-	</db-entity>
-	<obj-entity name="QuoteAdress" className="org.apache.cayenne.testdo.quotemap.QuoteAdress" dbEntityName="QUOTE_ADRESS">
-		<obj-attribute name="city" type="java.lang.String" db-attribute-path="City"/>
-	</obj-entity>
-	<obj-entity name="Quote_Person" className="org.apache.cayenne.testdo.quotemap.Quote_Person" dbEntityName="quote Person">
-		<obj-attribute name="dAte" type="java.util.Date" db-attribute-path="DAte"/>
-		<obj-attribute name="fULL_name" type="java.lang.String" db-attribute-path="FULL name"/>
-		<obj-attribute name="name" type="java.lang.String" db-attribute-path="NAME"/>
-		<obj-attribute name="salary" type="java.lang.Integer" db-attribute-path="salary"/>
-	</obj-entity>
-</data-map>
+<?xml version="1.0" encoding="utf-8"?>
+<data-map xmlns="http://cayenne.apache.org/schema/3.0/modelMap"
+	 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	 xsi:schemaLocation="http://cayenne.apache.org/schema/3.0/modelMap http://cayenne.apache.org/schema/3.0/modelMap.xsd"
+	 project-version="6">
+	<property name="defaultPackage" value="org.apache.cayenne.testdo.quotemap"/>
+	<property name="quoteSqlIdentifiers" value="true"/>
+	<db-entity name="QUOTE_ADRESS">
+		<db-attribute name="ADRES ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
+		<db-attribute name="City" type="VARCHAR" length="200"/>
+	</db-entity>
+	<db-entity name="quote Person">
+		<db-attribute name="DAte" type="DATE"/>
+		<db-attribute name="FULL name" type="VARCHAR" length="300"/>
+		<db-attribute name="NAME" type="VARCHAR" length="100"/>
+		<db-attribute name="id" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
+		<db-attribute name="salary" type="INTEGER"/>
+	</db-entity>
+	<obj-entity name="QuoteAdress" className="org.apache.cayenne.testdo.quotemap.QuoteAdress" dbEntityName="QUOTE_ADRESS">
+		<obj-attribute name="city" type="java.lang.String" db-attribute-path="City"/>
+	</obj-entity>
+	<obj-entity name="Quote_Person" className="org.apache.cayenne.testdo.quotemap.Quote_Person" dbEntityName="quote Person">
+		<obj-attribute name="dAte" type="java.util.Date" db-attribute-path="DAte"/>
+		<obj-attribute name="fULL_name" type="java.lang.String" db-attribute-path="FULL name"/>
+		<obj-attribute name="name" type="java.lang.String" db-attribute-path="NAME"/>
+		<obj-attribute name="salary" type="java.lang.Integer" db-attribute-path="salary"/>
+	</obj-entity>
+</data-map>

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/sus-map.map.xml
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/sus-map.map.xml?rev=928478&r1=928477&r2=928478&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/sus-map.map.xml (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/sus-map.map.xml Sun Mar 28 19:12:30 2010
@@ -1,16 +1,16 @@
-<?xml version="1.0" encoding="utf-8"?>
-<data-map xmlns="http://cayenne.apache.org/schema/3.0/modelMap"
-	 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	 xsi:schemaLocation="http://cayenne.apache.org/schema/3.0/modelMap http://cayenne.apache.org/schema/3.0/modelMap.xsd"
-	 project-version="6">
-	<db-entity name="SUS1">
-		<db-attribute name="id" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
-		<db-attribute name="strNoMandatory" type="VARCHAR" length="200"/>
-		<db-attribute name="testBoolean" type="BOOLEAN" isMandatory="true"/>
-		<db-attribute name="testChar" type="CHAR" isMandatory="true" length="200"/>
-		<db-attribute name="testString" type="VARCHAR" isMandatory="true" length="200"/>
-	</db-entity>
-	<db-entity name="SUS2">
-		<db-attribute name="id" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
-	</db-entity>
-</data-map>
+<?xml version="1.0" encoding="utf-8"?>
+<data-map xmlns="http://cayenne.apache.org/schema/3.0/modelMap"
+	 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	 xsi:schemaLocation="http://cayenne.apache.org/schema/3.0/modelMap http://cayenne.apache.org/schema/3.0/modelMap.xsd"
+	 project-version="6">
+	<db-entity name="SUS1">
+		<db-attribute name="id" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
+		<db-attribute name="strNoMandatory" type="VARCHAR" length="200"/>
+		<db-attribute name="testBoolean" type="BOOLEAN" isMandatory="true"/>
+		<db-attribute name="testChar" type="CHAR" isMandatory="true" length="200"/>
+		<db-attribute name="testString" type="VARCHAR" isMandatory="true" length="200"/>
+	</db-entity>
+	<db-entity name="SUS2">
+		<db-attribute name="id" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
+	</db-entity>
+</data-map>

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/testmap.map.xml
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/testmap.map.xml?rev=928478&r1=928477&r2=928478&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/testmap.map.xml (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/resources/testmap.map.xml Sun Mar 28 19:12:30 2010
@@ -171,6 +171,17 @@
 		<db-attribute name="GENERATED_COLUMN" type="INTEGER" isPrimaryKey="true" isGenerated="true" isMandatory="true"/>
 		<db-attribute name="NAME" type="VARCHAR" length="100"/>
 	</db-entity>
+	<db-entity name="GENERATED_F1">
+		<db-attribute name="ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
+	</db-entity>
+	<db-entity name="GENERATED_F2">
+		<db-attribute name="ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
+	</db-entity>
+	<db-entity name="GENERATED_JOIN">
+		<db-attribute name="ID" type="INTEGER" isPrimaryKey="true" isGenerated="true" isMandatory="true"/>
+		<db-attribute name="ID1" type="INTEGER"/>
+		<db-attribute name="ID2" type="INTEGER"/>
+	</db-entity>
 	<db-entity name="LONG_ENTITY">
 		<db-attribute name="ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
 		<db-attribute name="LONG_FIELD" type="BIGINT"/>
@@ -401,6 +412,10 @@
 	<obj-entity name="GeneratedColumnTestEntity" className="org.apache.art.GeneratedColumnTestEntity" dbEntityName="GENERATED_COLUMN_TEST">
 		<obj-attribute name="name" type="java.lang.String" db-attribute-path="NAME"/>
 	</obj-entity>
+	<obj-entity name="GeneratedF1" className="org.apache.art.GeneratedF1" clientClassName="test.client.GeneratedF1" dbEntityName="GENERATED_F1" superClassName="org.apache.cayenne.CayenneDataObject" clientSuperClassName="org.apache.cayenne.PersistentObject">
+	</obj-entity>
+	<obj-entity name="GeneratedF2" className="org.apache.art.GeneratedF2" clientClassName="test.client.GeneratedF2" dbEntityName="GENERATED_F2" superClassName="org.apache.cayenne.CayenneDataObject" clientSuperClassName="org.apache.cayenne.PersistentObject">
+	</obj-entity>
 	<obj-entity name="LongEntity" className="org.apache.art.LongEntity" dbEntityName="LONG_ENTITY">
 		<obj-attribute name="longField" type="java.lang.Long" db-attribute-path="LONG_FIELD"/>
 	</obj-entity>
@@ -576,6 +591,18 @@
 	<db-relationship name="toDep" source="GENERATED_COLUMN_TEST" target="GENERATED_COLUMN_DEP" toDependentPK="true" toMany="false">
 		<db-attribute-pair source="GENERATED_COLUMN" target="GENERATED_COLUMN_FK"/>
 	</db-relationship>
+	<db-relationship name="join" source="GENERATED_F1" target="GENERATED_JOIN" toMany="true">
+		<db-attribute-pair source="ID" target="ID1"/>
+	</db-relationship>
+	<db-relationship name="join" source="GENERATED_F2" target="GENERATED_JOIN" toMany="true">
+		<db-attribute-pair source="ID" target="ID2"/>
+	</db-relationship>
+	<db-relationship name="f1" source="GENERATED_JOIN" target="GENERATED_F1" toMany="false">
+		<db-attribute-pair source="ID1" target="ID"/>
+	</db-relationship>
+	<db-relationship name="f2" source="GENERATED_JOIN" target="GENERATED_F2" toMany="false">
+		<db-attribute-pair source="ID2" target="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>
@@ -630,6 +657,8 @@
 	<obj-relationship name="toDetail" source="GeneratedColumnCompMaster" target="GeneratedColumnCompKey" db-relationship-path="toDetail"/>
 	<obj-relationship name="toMaster" source="GeneratedColumnDep" target="GeneratedColumnTestEntity" db-relationship-path="toMaster"/>
 	<obj-relationship name="toDep" source="GeneratedColumnTestEntity" target="GeneratedColumnDep" db-relationship-path="toDep"/>
+	<obj-relationship name="f2" source="GeneratedF1" target="GeneratedF2" deleteRule="Nullify" db-relationship-path="join.f2"/>
+	<obj-relationship name="f1" source="GeneratedF2" target="GeneratedF1" deleteRule="Nullify" db-relationship-path="join.f1"/>
 	<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="details" source="MixedPersistenceStrategy" target="MixedPersistenceStrategy2" db-relationship-path="details"/>



Mime
View raw message