cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r656254 - in /cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src: main/java/org/apache/cayenne/map/ main/java/org/apache/cayenne/reflect/ test/java/org/apache/cayenne/ test/java/org/apache/cayenne/testdo/mt/ test/java/...
Date Wed, 14 May 2008 12:54:24 GMT
Author: aadamchik
Date: Wed May 14 05:54:23 2008
New Revision: 656254

URL: http://svn.apache.org/viewvc?rev=656254&view=rev
Log:
CAY-1046 Make PK metadata available via Obj* API. 
(fixing problems introduced by the implementation; adding 'isPrimaryKey' to ObjAttribute)

Added:
    cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/testdo/mt/ClientMtMeaningfulPk.java
    cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/testdo/mt/MtMeaningfulPk.java
    cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/testdo/mt/auto/_ClientMtMeaningfulPk.java
    cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/testdo/mt/auto/_MtMeaningfulPk.java
Modified:
    cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/map/ClientObjAttribute.java
    cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/map/ObjAttribute.java
    cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/map/SyntheticPKObjAttribute.java
    cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/reflect/PersistentDescriptor.java
    cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/CayenneContextWithDataContextTest.java
    cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/testdo/mt/auto/_ClientMtDeleteCascade.java
    cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/testdo/mt/auto/_ClientMtDeleteDeny.java
    cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/testdo/mt/auto/_ClientMtDeleteNullify.java
    cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/testdo/mt/auto/_ClientMtDeleteRule.java
    cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/testdo/mt/auto/_ClientMtMapToMany.java
    cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/testdo/mt/auto/_ClientMtMapToManyTarget.java
    cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/testdo/mt/auto/_ClientMtReflexive.java
    cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/testdo/mt/auto/_ClientMtTable1.java
    cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/testdo/mt/auto/_ClientMtTable2.java
    cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/testdo/mt/auto/_ClientMtTable3.java
    cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/testdo/mt/auto/_ClientMtTable4.java
    cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/testdo/mt/auto/_ClientMtTable5.java
    cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/test/resources/dml/CayenneContextWithDataContextTest.xml
    cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/test/resources/multi-tier.map.xml

Modified: cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/map/ClientObjAttribute.java
URL: http://svn.apache.org/viewvc/cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/map/ClientObjAttribute.java?rev=656254&r1=656253&r2=656254&view=diff
==============================================================================
--- cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/map/ClientObjAttribute.java
(original)
+++ cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/map/ClientObjAttribute.java
Wed May 14 05:54:23 2008
@@ -29,10 +29,16 @@
 
     boolean mandatory;
     int maxLength = -1;
+    private boolean primaryKey;
 
     ClientObjAttribute(String name) {
         super(name);
     }
+    
+    @Override
+    public boolean isPrimaryKey() {
+        return primaryKey;
+    }
 
     /**
      * @see DbAttribute#isMandatory()
@@ -56,4 +62,8 @@
         this.maxLength = maxLength;
     }
 
+    
+    public void setPrimaryKey(boolean primaryKey) {
+        this.primaryKey = primaryKey;
+    }
 }

Modified: cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/map/ObjAttribute.java
URL: http://svn.apache.org/viewvc/cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/map/ObjAttribute.java?rev=656254&r1=656253&r2=656254&view=diff
==============================================================================
--- cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/map/ObjAttribute.java
(original)
+++ cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/map/ObjAttribute.java
Wed May 14 05:54:23 2008
@@ -116,6 +116,18 @@
     public void setType(String type) {
         this.type = type;
     }
+    
+    /**
+     * @since 3.0
+     */
+    public boolean isPrimaryKey() {
+        if(dbAttributePath == null) {
+            return false;
+        }
+        
+        DbAttribute dbAttribute = getDbAttribute();
+        return dbAttribute != null && dbAttribute.isPrimaryKey();
+    }
 
     /**
      * Returns whether this attribute should be used for locking.
@@ -262,6 +274,7 @@
             // expose PK attribute names - the client may need those to build ObjectIds
             if (dbAttribute.isPrimaryKey()) {
                 attribute.setDbAttributePath(dbAttribute.getName());
+                attribute.setPrimaryKey(true);
             }
 
             attribute.setMandatory(dbAttribute.isMandatory());

Modified: cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/map/SyntheticPKObjAttribute.java
URL: http://svn.apache.org/viewvc/cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/map/SyntheticPKObjAttribute.java?rev=656254&r1=656253&r2=656254&view=diff
==============================================================================
--- cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/map/SyntheticPKObjAttribute.java
(original)
+++ cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/map/SyntheticPKObjAttribute.java
Wed May 14 05:54:23 2008
@@ -49,4 +49,9 @@
 
         return attribute;
     }
+    
+    @Override
+    public boolean isPrimaryKey() {
+        return true;
+    }
 }

Modified: cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/reflect/PersistentDescriptor.java
URL: http://svn.apache.org/viewvc/cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/reflect/PersistentDescriptor.java?rev=656254&r1=656253&r2=656254&view=diff
==============================================================================
--- cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/reflect/PersistentDescriptor.java
(original)
+++ cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/reflect/PersistentDescriptor.java
Wed May 14 05:54:23 2008
@@ -88,8 +88,7 @@
 
         if (property instanceof AttributeProperty) {
             ObjAttribute attribute = ((AttributeProperty) property).getAttribute();
-            if (attribute.getDbAttributeName() != null
-                    && attribute.getDbAttribute().isPrimaryKey()) {
+            if (attribute.isPrimaryKey()) {
 
                 if (declaredIdProperties == null) {
                     declaredIdProperties = new ArrayList<Property>(2);

Modified: cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/CayenneContextWithDataContextTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/CayenneContextWithDataContextTest.java?rev=656254&r1=656253&r2=656254&view=diff
==============================================================================
--- cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/CayenneContextWithDataContextTest.java
(original)
+++ cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/CayenneContextWithDataContextTest.java
Wed May 14 05:54:23 2008
@@ -22,12 +22,12 @@
 import java.util.Iterator;
 import java.util.List;
 
-import org.apache.art.Artist;
 import org.apache.cayenne.access.ClientServerChannel;
 import org.apache.cayenne.access.DataContext;
 import org.apache.cayenne.access.DataDomain;
 import org.apache.cayenne.map.LifecycleEvent;
 import org.apache.cayenne.query.ObjectIdQuery;
+import org.apache.cayenne.query.Ordering;
 import org.apache.cayenne.query.QueryMetadata;
 import org.apache.cayenne.query.SelectQuery;
 import org.apache.cayenne.reflect.LifecycleCallbackRegistry;
@@ -35,6 +35,7 @@
 import org.apache.cayenne.remote.ClientConnection;
 import org.apache.cayenne.remote.RemoteIncrementalFaultList;
 import org.apache.cayenne.remote.service.LocalConnection;
+import org.apache.cayenne.testdo.mt.ClientMtMeaningfulPk;
 import org.apache.cayenne.testdo.mt.ClientMtReflexive;
 import org.apache.cayenne.testdo.mt.ClientMtTable1;
 import org.apache.cayenne.testdo.mt.ClientMtTable2;
@@ -351,6 +352,21 @@
             // expected
         }
     }
+    
+    public void testMeaningfulPK() throws Exception {
+        createTestData("testMeaningfulPK");
+        
+        SelectQuery query = new SelectQuery(ClientMtMeaningfulPk.class);
+        query.addOrdering(ClientMtMeaningfulPk.PK_PROPERTY, Ordering.DESC);
+        
+        UnitLocalConnection connection = new UnitLocalConnection(new ClientServerChannel(
+                getDomain()), LocalConnection.HESSIAN_SERIALIZATION);
+        ClientChannel channel = new ClientChannel(connection);
+        CayenneContext context = new CayenneContext(channel);
+
+        List results = context.performQuery(query);
+        assertEquals(2, results.size());
+    }
 
     public void testPrefetchingToOne() throws Exception {
         createTestData("testPrefetching");

Added: cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/testdo/mt/ClientMtMeaningfulPk.java
URL: http://svn.apache.org/viewvc/cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/testdo/mt/ClientMtMeaningfulPk.java?rev=656254&view=auto
==============================================================================
--- cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/testdo/mt/ClientMtMeaningfulPk.java
(added)
+++ cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/testdo/mt/ClientMtMeaningfulPk.java
Wed May 14 05:54:23 2008
@@ -0,0 +1,10 @@
+package org.apache.cayenne.testdo.mt;
+
+import org.apache.cayenne.testdo.mt.auto._ClientMtMeaningfulPk;
+
+/**
+ * A persistent class mapped as "MtMeaningfulPk" Cayenne entity.
+ */
+public class ClientMtMeaningfulPk extends _ClientMtMeaningfulPk {
+
+}

Added: cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/testdo/mt/MtMeaningfulPk.java
URL: http://svn.apache.org/viewvc/cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/testdo/mt/MtMeaningfulPk.java?rev=656254&view=auto
==============================================================================
--- cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/testdo/mt/MtMeaningfulPk.java
(added)
+++ cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/testdo/mt/MtMeaningfulPk.java
Wed May 14 05:54:23 2008
@@ -0,0 +1,7 @@
+package org.apache.cayenne.testdo.mt;
+
+import org.apache.cayenne.testdo.mt.auto._MtMeaningfulPk;
+
+public class MtMeaningfulPk extends _MtMeaningfulPk {
+
+}

Modified: cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/testdo/mt/auto/_ClientMtDeleteCascade.java
URL: http://svn.apache.org/viewvc/cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/testdo/mt/auto/_ClientMtDeleteCascade.java?rev=656254&r1=656253&r2=656254&view=diff
==============================================================================
--- cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/testdo/mt/auto/_ClientMtDeleteCascade.java
(original)
+++ cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/testdo/mt/auto/_ClientMtDeleteCascade.java
Wed May 14 05:54:23 2008
@@ -21,37 +21,37 @@
         if(objectContext != null) {
             objectContext.prepareForAccess(this, "name", false);
         }
-        
+
         return name;
     }
     public void setName(String name) {
         if(objectContext != null) {
             objectContext.prepareForAccess(this, "name", false);
         }
-        
+
         Object oldValue = this.name;
         this.name = name;
-        
+
         // notify objectContext about simple property change
         if(objectContext != null) {
             objectContext.propertyChanged(this, "name", oldValue, name);
         }
     }
-    
-    
+
+
     public ClientMtDeleteRule getCascade() {
         if(objectContext != null) {
             objectContext.prepareForAccess(this, "cascade", true);
         }
-        
+
         return (ClientMtDeleteRule) cascade.getValue();
     }
     public void setCascade(ClientMtDeleteRule cascade) {
         if(objectContext != null) {
             objectContext.prepareForAccess(this, "cascade", true);
         }
-        
+
         this.cascade.setValue(cascade);
     }
-    
+
 }

Modified: cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/testdo/mt/auto/_ClientMtDeleteDeny.java
URL: http://svn.apache.org/viewvc/cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/testdo/mt/auto/_ClientMtDeleteDeny.java?rev=656254&r1=656253&r2=656254&view=diff
==============================================================================
--- cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/testdo/mt/auto/_ClientMtDeleteDeny.java
(original)
+++ cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/testdo/mt/auto/_ClientMtDeleteDeny.java
Wed May 14 05:54:23 2008
@@ -21,37 +21,37 @@
         if(objectContext != null) {
             objectContext.prepareForAccess(this, "name", false);
         }
-        
+
         return name;
     }
     public void setName(String name) {
         if(objectContext != null) {
             objectContext.prepareForAccess(this, "name", false);
         }
-        
+
         Object oldValue = this.name;
         this.name = name;
-        
+
         // notify objectContext about simple property change
         if(objectContext != null) {
             objectContext.propertyChanged(this, "name", oldValue, name);
         }
     }
-    
-    
+
+
     public ClientMtDeleteRule getDeny() {
         if(objectContext != null) {
             objectContext.prepareForAccess(this, "deny", true);
         }
-        
+
         return (ClientMtDeleteRule) deny.getValue();
     }
     public void setDeny(ClientMtDeleteRule deny) {
         if(objectContext != null) {
             objectContext.prepareForAccess(this, "deny", true);
         }
-        
+
         this.deny.setValue(deny);
     }
-    
+
 }

Modified: cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/testdo/mt/auto/_ClientMtDeleteNullify.java
URL: http://svn.apache.org/viewvc/cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/testdo/mt/auto/_ClientMtDeleteNullify.java?rev=656254&r1=656253&r2=656254&view=diff
==============================================================================
--- cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/testdo/mt/auto/_ClientMtDeleteNullify.java
(original)
+++ cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/testdo/mt/auto/_ClientMtDeleteNullify.java
Wed May 14 05:54:23 2008
@@ -21,37 +21,37 @@
         if(objectContext != null) {
             objectContext.prepareForAccess(this, "name", false);
         }
-        
+
         return name;
     }
     public void setName(String name) {
         if(objectContext != null) {
             objectContext.prepareForAccess(this, "name", false);
         }
-        
+
         Object oldValue = this.name;
         this.name = name;
-        
+
         // notify objectContext about simple property change
         if(objectContext != null) {
             objectContext.propertyChanged(this, "name", oldValue, name);
         }
     }
-    
-    
+
+
     public ClientMtDeleteRule getNullify() {
         if(objectContext != null) {
             objectContext.prepareForAccess(this, "nullify", true);
         }
-        
+
         return (ClientMtDeleteRule) nullify.getValue();
     }
     public void setNullify(ClientMtDeleteRule nullify) {
         if(objectContext != null) {
             objectContext.prepareForAccess(this, "nullify", true);
         }
-        
+
         this.nullify.setValue(nullify);
     }
-    
+
 }

Modified: cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/testdo/mt/auto/_ClientMtDeleteRule.java
URL: http://svn.apache.org/viewvc/cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/testdo/mt/auto/_ClientMtDeleteRule.java?rev=656254&r1=656253&r2=656254&view=diff
==============================================================================
--- cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/testdo/mt/auto/_ClientMtDeleteRule.java
(original)
+++ cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/testdo/mt/auto/_ClientMtDeleteRule.java
Wed May 14 05:54:23 2008
@@ -1,5 +1,7 @@
 package org.apache.cayenne.testdo.mt.auto;
 
+import java.util.List;
+
 import org.apache.cayenne.PersistentObject;
 import org.apache.cayenne.testdo.mt.ClientMtDeleteCascade;
 import org.apache.cayenne.testdo.mt.ClientMtDeleteDeny;
@@ -18,96 +20,96 @@
     public static final String FROM_NULLIFY_PROPERTY = "fromNullify";
 
     protected String name;
-    protected java.util.List fromCascade;
-    protected java.util.List fromDeny;
-    protected java.util.List fromNullify;
+    protected List<ClientMtDeleteCascade> fromCascade;
+    protected List<ClientMtDeleteDeny> fromDeny;
+    protected List<ClientMtDeleteNullify> fromNullify;
 
     public String getName() {
         if(objectContext != null) {
             objectContext.prepareForAccess(this, "name", false);
         }
-        
+
         return name;
     }
     public void setName(String name) {
         if(objectContext != null) {
             objectContext.prepareForAccess(this, "name", false);
         }
-        
+
         Object oldValue = this.name;
         this.name = name;
-        
+
         // notify objectContext about simple property change
         if(objectContext != null) {
             objectContext.propertyChanged(this, "name", oldValue, name);
         }
     }
-    
-    
-    public java.util.List getFromCascade() {
+
+
+    public List<ClientMtDeleteCascade> getFromCascade() {
         if(objectContext != null) {
             objectContext.prepareForAccess(this, "fromCascade", true);
         }
-        
+
         return fromCascade;
     }
     public void addToFromCascade(ClientMtDeleteCascade object) {
         if(objectContext != null) {
             objectContext.prepareForAccess(this, "fromCascade", true);
         }
-        
+
         this.fromCascade.add(object);
     }
     public void removeFromFromCascade(ClientMtDeleteCascade object) {
         if(objectContext != null) {
             objectContext.prepareForAccess(this, "fromCascade", true);
         }
-        
+
         this.fromCascade.remove(object);
     }
-    
-    public java.util.List getFromDeny() {
+
+    public List<ClientMtDeleteDeny> getFromDeny() {
         if(objectContext != null) {
             objectContext.prepareForAccess(this, "fromDeny", true);
         }
-        
+
         return fromDeny;
     }
     public void addToFromDeny(ClientMtDeleteDeny object) {
         if(objectContext != null) {
             objectContext.prepareForAccess(this, "fromDeny", true);
         }
-        
+
         this.fromDeny.add(object);
     }
     public void removeFromFromDeny(ClientMtDeleteDeny object) {
         if(objectContext != null) {
             objectContext.prepareForAccess(this, "fromDeny", true);
         }
-        
+
         this.fromDeny.remove(object);
     }
-    
-    public java.util.List getFromNullify() {
+
+    public List<ClientMtDeleteNullify> getFromNullify() {
         if(objectContext != null) {
             objectContext.prepareForAccess(this, "fromNullify", true);
         }
-        
+
         return fromNullify;
     }
     public void addToFromNullify(ClientMtDeleteNullify object) {
         if(objectContext != null) {
             objectContext.prepareForAccess(this, "fromNullify", true);
         }
-        
+
         this.fromNullify.add(object);
     }
     public void removeFromFromNullify(ClientMtDeleteNullify object) {
         if(objectContext != null) {
             objectContext.prepareForAccess(this, "fromNullify", true);
         }
-        
+
         this.fromNullify.remove(object);
     }
-    
+
 }

Modified: cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/testdo/mt/auto/_ClientMtMapToMany.java
URL: http://svn.apache.org/viewvc/cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/testdo/mt/auto/_ClientMtMapToMany.java?rev=656254&r1=656253&r2=656254&view=diff
==============================================================================
--- cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/testdo/mt/auto/_ClientMtMapToMany.java
(original)
+++ cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/testdo/mt/auto/_ClientMtMapToMany.java
Wed May 14 05:54:23 2008
@@ -1,5 +1,7 @@
 package org.apache.cayenne.testdo.mt.auto;
 
+import java.util.Map;
+
 import org.apache.cayenne.PersistentObject;
 import org.apache.cayenne.testdo.mt.ClientMtMapToManyTarget;
 
@@ -12,28 +14,28 @@
 
     public static final String TARGETS_PROPERTY = "targets";
 
-    protected java.util.Map targets;
+    protected Map<Object, ClientMtMapToManyTarget> targets;
 
-    public java.util.Map getTargets() {
+    public Map<Object, ClientMtMapToManyTarget> getTargets() {
         if(objectContext != null) {
             objectContext.prepareForAccess(this, "targets", true);
         }
-        
+
         return targets;
     }
 	public void addToTargets(ClientMtMapToManyTarget object) {
         if(objectContext != null) {
             objectContext.prepareForAccess(this, "targets", true);
         }
-        
+
         this.targets.put(getMapKey("targets", object), object);
     }
     public void removeFromTargets(ClientMtMapToManyTarget object) {
         if(objectContext != null) {
             objectContext.prepareForAccess(this, "targets", true);
         }
-        
+
         this.targets.remove(getMapKey("targets", object));
     }
-    
+
 }

Modified: cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/testdo/mt/auto/_ClientMtMapToManyTarget.java
URL: http://svn.apache.org/viewvc/cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/testdo/mt/auto/_ClientMtMapToManyTarget.java?rev=656254&r1=656253&r2=656254&view=diff
==============================================================================
--- cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/testdo/mt/auto/_ClientMtMapToManyTarget.java
(original)
+++ cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/testdo/mt/auto/_ClientMtMapToManyTarget.java
Wed May 14 05:54:23 2008
@@ -19,15 +19,15 @@
         if(objectContext != null) {
             objectContext.prepareForAccess(this, "mapToMany", true);
         }
-        
+
         return (ClientMtMapToMany) mapToMany.getValue();
     }
     public void setMapToMany(ClientMtMapToMany mapToMany) {
         if(objectContext != null) {
             objectContext.prepareForAccess(this, "mapToMany", true);
         }
-        
+
         this.mapToMany.setValue(mapToMany);
     }
-    
+
 }

Added: cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/testdo/mt/auto/_ClientMtMeaningfulPk.java
URL: http://svn.apache.org/viewvc/cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/testdo/mt/auto/_ClientMtMeaningfulPk.java?rev=656254&view=auto
==============================================================================
--- cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/testdo/mt/auto/_ClientMtMeaningfulPk.java
(added)
+++ cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/testdo/mt/auto/_ClientMtMeaningfulPk.java
Wed May 14 05:54:23 2008
@@ -0,0 +1,38 @@
+package org.apache.cayenne.testdo.mt.auto;
+
+import org.apache.cayenne.PersistentObject;
+
+/**
+ * A generated persistent class mapped as "MtMeaningfulPk" Cayenne entity. It is a good idea
to
+ * avoid changing this class manually, since it will be overwritten next time code is
+ * regenerated. If you need to make any customizations, put them in a subclass.
+ */
+public abstract class _ClientMtMeaningfulPk extends PersistentObject {
+
+    public static final String PK_PROPERTY = "pk";
+
+    protected String pk;
+
+    public String getPk() {
+        if(objectContext != null) {
+            objectContext.prepareForAccess(this, "pk", false);
+        }
+
+        return pk;
+    }
+    public void setPk(String pk) {
+        if(objectContext != null) {
+            objectContext.prepareForAccess(this, "pk", false);
+        }
+
+        Object oldValue = this.pk;
+        this.pk = pk;
+
+        // notify objectContext about simple property change
+        if(objectContext != null) {
+            objectContext.propertyChanged(this, "pk", oldValue, pk);
+        }
+    }
+
+
+}

Modified: cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/testdo/mt/auto/_ClientMtReflexive.java
URL: http://svn.apache.org/viewvc/cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/testdo/mt/auto/_ClientMtReflexive.java?rev=656254&r1=656253&r2=656254&view=diff
==============================================================================
--- cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/testdo/mt/auto/_ClientMtReflexive.java
(original)
+++ cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/testdo/mt/auto/_ClientMtReflexive.java
Wed May 14 05:54:23 2008
@@ -1,5 +1,7 @@
 package org.apache.cayenne.testdo.mt.auto;
 
+import java.util.List;
+
 import org.apache.cayenne.PersistentObject;
 import org.apache.cayenne.ValueHolder;
 import org.apache.cayenne.testdo.mt.ClientMtReflexive;
@@ -16,66 +18,66 @@
     public static final String TO_PARENT_PROPERTY = "toParent";
 
     protected String name;
-    protected java.util.List children;
+    protected List<ClientMtReflexive> children;
     protected ValueHolder toParent;
 
     public String getName() {
         if(objectContext != null) {
             objectContext.prepareForAccess(this, "name", false);
         }
-        
+
         return name;
     }
     public void setName(String name) {
         if(objectContext != null) {
             objectContext.prepareForAccess(this, "name", false);
         }
-        
+
         Object oldValue = this.name;
         this.name = name;
-        
+
         // notify objectContext about simple property change
         if(objectContext != null) {
             objectContext.propertyChanged(this, "name", oldValue, name);
         }
     }
-    
-    
-    public java.util.List getChildren() {
+
+
+    public List<ClientMtReflexive> getChildren() {
         if(objectContext != null) {
             objectContext.prepareForAccess(this, "children", true);
         }
-        
+
         return children;
     }
     public void addToChildren(ClientMtReflexive object) {
         if(objectContext != null) {
             objectContext.prepareForAccess(this, "children", true);
         }
-        
+
         this.children.add(object);
     }
     public void removeFromChildren(ClientMtReflexive object) {
         if(objectContext != null) {
             objectContext.prepareForAccess(this, "children", true);
         }
-        
+
         this.children.remove(object);
     }
-    
+
     public ClientMtReflexive getToParent() {
         if(objectContext != null) {
             objectContext.prepareForAccess(this, "toParent", true);
         }
-        
+
         return (ClientMtReflexive) toParent.getValue();
     }
     public void setToParent(ClientMtReflexive toParent) {
         if(objectContext != null) {
             objectContext.prepareForAccess(this, "toParent", true);
         }
-        
+
         this.toParent.setValue(toParent);
     }
-    
+
 }

Modified: cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/testdo/mt/auto/_ClientMtTable1.java
URL: http://svn.apache.org/viewvc/cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/testdo/mt/auto/_ClientMtTable1.java?rev=656254&r1=656253&r2=656254&view=diff
==============================================================================
--- cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/testdo/mt/auto/_ClientMtTable1.java
(original)
+++ cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/testdo/mt/auto/_ClientMtTable1.java
Wed May 14 05:54:23 2008
@@ -1,5 +1,7 @@
 package org.apache.cayenne.testdo.mt.auto;
 
+import java.util.List;
+
 import org.apache.cayenne.PersistentObject;
 import org.apache.cayenne.testdo.mt.ClientMtTable2;
 
@@ -16,72 +18,72 @@
 
     protected String globalAttribute1;
     protected String serverAttribute1;
-    protected java.util.List table2Array;
+    protected List<ClientMtTable2> table2Array;
 
     public String getGlobalAttribute1() {
         if(objectContext != null) {
             objectContext.prepareForAccess(this, "globalAttribute1", false);
         }
-        
+
         return globalAttribute1;
     }
     public void setGlobalAttribute1(String globalAttribute1) {
         if(objectContext != null) {
             objectContext.prepareForAccess(this, "globalAttribute1", false);
         }
-        
+
         Object oldValue = this.globalAttribute1;
         this.globalAttribute1 = globalAttribute1;
-        
+
         // notify objectContext about simple property change
         if(objectContext != null) {
             objectContext.propertyChanged(this, "globalAttribute1", oldValue, globalAttribute1);
         }
     }
-    
-    
+
+
     public String getServerAttribute1() {
         if(objectContext != null) {
             objectContext.prepareForAccess(this, "serverAttribute1", false);
         }
-        
+
         return serverAttribute1;
     }
     public void setServerAttribute1(String serverAttribute1) {
         if(objectContext != null) {
             objectContext.prepareForAccess(this, "serverAttribute1", false);
         }
-        
+
         Object oldValue = this.serverAttribute1;
         this.serverAttribute1 = serverAttribute1;
-        
+
         // notify objectContext about simple property change
         if(objectContext != null) {
             objectContext.propertyChanged(this, "serverAttribute1", oldValue, serverAttribute1);
         }
     }
-    
-    
-    public java.util.List getTable2Array() {
+
+
+    public List<ClientMtTable2> getTable2Array() {
         if(objectContext != null) {
             objectContext.prepareForAccess(this, "table2Array", true);
         }
-        
+
         return table2Array;
     }
     public void addToTable2Array(ClientMtTable2 object) {
         if(objectContext != null) {
             objectContext.prepareForAccess(this, "table2Array", true);
         }
-        
+
         this.table2Array.add(object);
     }
     public void removeFromTable2Array(ClientMtTable2 object) {
         if(objectContext != null) {
             objectContext.prepareForAccess(this, "table2Array", true);
         }
-        
+
         this.table2Array.remove(object);
     }
-    
+
 }

Modified: cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/testdo/mt/auto/_ClientMtTable2.java
URL: http://svn.apache.org/viewvc/cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/testdo/mt/auto/_ClientMtTable2.java?rev=656254&r1=656253&r2=656254&view=diff
==============================================================================
--- cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/testdo/mt/auto/_ClientMtTable2.java
(original)
+++ cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/testdo/mt/auto/_ClientMtTable2.java
Wed May 14 05:54:23 2008
@@ -21,37 +21,37 @@
         if(objectContext != null) {
             objectContext.prepareForAccess(this, "globalAttribute", false);
         }
-        
+
         return globalAttribute;
     }
     public void setGlobalAttribute(String globalAttribute) {
         if(objectContext != null) {
             objectContext.prepareForAccess(this, "globalAttribute", false);
         }
-        
+
         Object oldValue = this.globalAttribute;
         this.globalAttribute = globalAttribute;
-        
+
         // notify objectContext about simple property change
         if(objectContext != null) {
             objectContext.propertyChanged(this, "globalAttribute", oldValue, globalAttribute);
         }
     }
-    
-    
+
+
     public ClientMtTable1 getTable1() {
         if(objectContext != null) {
             objectContext.prepareForAccess(this, "table1", true);
         }
-        
+
         return (ClientMtTable1) table1.getValue();
     }
     public void setTable1(ClientMtTable1 table1) {
         if(objectContext != null) {
             objectContext.prepareForAccess(this, "table1", true);
         }
-        
+
         this.table1.setValue(table1);
     }
-    
+
 }

Modified: cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/testdo/mt/auto/_ClientMtTable3.java
URL: http://svn.apache.org/viewvc/cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/testdo/mt/auto/_ClientMtTable3.java?rev=656254&r1=656253&r2=656254&view=diff
==============================================================================
--- cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/testdo/mt/auto/_ClientMtTable3.java
(original)
+++ cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/testdo/mt/auto/_ClientMtTable3.java
Wed May 14 05:54:23 2008
@@ -21,66 +21,66 @@
         if(objectContext != null) {
             objectContext.prepareForAccess(this, "binaryColumn", false);
         }
-        
+
         return binaryColumn;
     }
     public void setBinaryColumn(byte[] binaryColumn) {
         if(objectContext != null) {
             objectContext.prepareForAccess(this, "binaryColumn", false);
         }
-        
+
         Object oldValue = this.binaryColumn;
         this.binaryColumn = binaryColumn;
-        
+
         // notify objectContext about simple property change
         if(objectContext != null) {
             objectContext.propertyChanged(this, "binaryColumn", oldValue, binaryColumn);
         }
     }
-    
-    
+
+
     public String getCharColumn() {
         if(objectContext != null) {
             objectContext.prepareForAccess(this, "charColumn", false);
         }
-        
+
         return charColumn;
     }
     public void setCharColumn(String charColumn) {
         if(objectContext != null) {
             objectContext.prepareForAccess(this, "charColumn", false);
         }
-        
+
         Object oldValue = this.charColumn;
         this.charColumn = charColumn;
-        
+
         // notify objectContext about simple property change
         if(objectContext != null) {
             objectContext.propertyChanged(this, "charColumn", oldValue, charColumn);
         }
     }
-    
-    
+
+
     public Integer getIntColumn() {
         if(objectContext != null) {
             objectContext.prepareForAccess(this, "intColumn", false);
         }
-        
+
         return intColumn;
     }
     public void setIntColumn(Integer intColumn) {
         if(objectContext != null) {
             objectContext.prepareForAccess(this, "intColumn", false);
         }
-        
+
         Object oldValue = this.intColumn;
         this.intColumn = intColumn;
-        
+
         // notify objectContext about simple property change
         if(objectContext != null) {
             objectContext.propertyChanged(this, "intColumn", oldValue, intColumn);
         }
     }
-    
-    
+
+
 }

Modified: cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/testdo/mt/auto/_ClientMtTable4.java
URL: http://svn.apache.org/viewvc/cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/testdo/mt/auto/_ClientMtTable4.java?rev=656254&r1=656253&r2=656254&view=diff
==============================================================================
--- cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/testdo/mt/auto/_ClientMtTable4.java
(original)
+++ cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/testdo/mt/auto/_ClientMtTable4.java
Wed May 14 05:54:23 2008
@@ -1,5 +1,7 @@
 package org.apache.cayenne.testdo.mt.auto;
 
+import java.util.List;
+
 import org.apache.cayenne.PersistentObject;
 import org.apache.cayenne.testdo.mt.ClientMtTable5;
 
@@ -12,28 +14,28 @@
 
     public static final String TABLE5S_PROPERTY = "table5s";
 
-    protected java.util.List table5s;
+    protected List<ClientMtTable5> table5s;
 
-    public java.util.List getTable5s() {
+    public List<ClientMtTable5> getTable5s() {
         if(objectContext != null) {
             objectContext.prepareForAccess(this, "table5s", true);
         }
-        
+
         return table5s;
     }
     public void addToTable5s(ClientMtTable5 object) {
         if(objectContext != null) {
             objectContext.prepareForAccess(this, "table5s", true);
         }
-        
+
         this.table5s.add(object);
     }
     public void removeFromTable5s(ClientMtTable5 object) {
         if(objectContext != null) {
             objectContext.prepareForAccess(this, "table5s", true);
         }
-        
+
         this.table5s.remove(object);
     }
-    
+
 }

Modified: cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/testdo/mt/auto/_ClientMtTable5.java
URL: http://svn.apache.org/viewvc/cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/testdo/mt/auto/_ClientMtTable5.java?rev=656254&r1=656253&r2=656254&view=diff
==============================================================================
--- cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/testdo/mt/auto/_ClientMtTable5.java
(original)
+++ cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/testdo/mt/auto/_ClientMtTable5.java
Wed May 14 05:54:23 2008
@@ -1,5 +1,7 @@
 package org.apache.cayenne.testdo.mt.auto;
 
+import java.util.List;
+
 import org.apache.cayenne.PersistentObject;
 import org.apache.cayenne.testdo.mt.ClientMtTable4;
 
@@ -12,28 +14,28 @@
 
     public static final String TABLE4S_PROPERTY = "table4s";
 
-    protected java.util.List table4s;
+    protected List<ClientMtTable4> table4s;
 
-    public java.util.List getTable4s() {
+    public List<ClientMtTable4> getTable4s() {
         if(objectContext != null) {
             objectContext.prepareForAccess(this, "table4s", true);
         }
-        
+
         return table4s;
     }
     public void addToTable4s(ClientMtTable4 object) {
         if(objectContext != null) {
             objectContext.prepareForAccess(this, "table4s", true);
         }
-        
+
         this.table4s.add(object);
     }
     public void removeFromTable4s(ClientMtTable4 object) {
         if(objectContext != null) {
             objectContext.prepareForAccess(this, "table4s", true);
         }
-        
+
         this.table4s.remove(object);
     }
-    
+
 }

Added: cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/testdo/mt/auto/_MtMeaningfulPk.java
URL: http://svn.apache.org/viewvc/cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/testdo/mt/auto/_MtMeaningfulPk.java?rev=656254&view=auto
==============================================================================
--- cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/testdo/mt/auto/_MtMeaningfulPk.java
(added)
+++ cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/testdo/mt/auto/_MtMeaningfulPk.java
Wed May 14 05:54:23 2008
@@ -0,0 +1,24 @@
+package org.apache.cayenne.testdo.mt.auto;
+
+import org.apache.cayenne.CayenneDataObject;
+
+/**
+ * Class _MtMeaningfulPk 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 _MtMeaningfulPk extends CayenneDataObject {
+
+    public static final String PK_PROPERTY = "pk";
+
+    public static final String PK_PK_COLUMN = "PK";
+
+    public void setPk(String pk) {
+        writeProperty("pk", pk);
+    }
+    public String getPk() {
+        return (String)readProperty("pk");
+    }
+
+}

Modified: cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/test/resources/dml/CayenneContextWithDataContextTest.xml
URL: http://svn.apache.org/viewvc/cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/test/resources/dml/CayenneContextWithDataContextTest.xml?rev=656254&r1=656253&r2=656254&view=diff
==============================================================================
--- cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/test/resources/dml/CayenneContextWithDataContextTest.xml
(original)
+++ cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/test/resources/dml/CayenneContextWithDataContextTest.xml
Wed May 14 05:54:23 2008
@@ -92,6 +92,20 @@
 		</value></constructor-arg>
 	</bean>
 	
+	<bean id="INSERT_MT_MEANINGFUL_PK1" class="org.apache.cayenne.unit.util.UpdatingSQLTemplate">
+		<constructor-arg type="java.lang.Class"><value>org.apache.cayenne.testdo.mt.MtTable2</value></constructor-arg>
+		<constructor-arg><value>
+		insert into MT_MEANINGFUL_PK (PK) values ('A')
+		</value></constructor-arg>
+	</bean>
+	
+	<bean id="INSERT_MT_MEANINGFUL_PK2" class="org.apache.cayenne.unit.util.UpdatingSQLTemplate">
+		<constructor-arg type="java.lang.Class"><value>org.apache.cayenne.testdo.mt.MtTable2</value></constructor-arg>
+		<constructor-arg><value>
+		insert into MT_MEANINGFUL_PK (PK) values ('B')
+		</value></constructor-arg>
+	</bean>
+	
 	<!-- ======================================= -->
 	<!-- Data Sets -->
 	<!-- ======================================= -->	
@@ -142,4 +156,13 @@
 			</list>
 		</constructor-arg>
 	</bean>
+	
+	<bean id="testMeaningfulPK" class="java.util.ArrayList">
+		<constructor-arg>
+			<list>
+				<ref bean="INSERT_MT_MEANINGFUL_PK1"/>
+				<ref bean="INSERT_MT_MEANINGFUL_PK2"/>
+			</list>
+		</constructor-arg>
+	</bean>
 </beans>
\ No newline at end of file

Modified: cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/test/resources/multi-tier.map.xml
URL: http://svn.apache.org/viewvc/cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/test/resources/multi-tier.map.xml?rev=656254&r1=656253&r2=656254&view=diff
==============================================================================
--- cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/test/resources/multi-tier.map.xml
(original)
+++ cayenne/main/tags/3.0M4/cayenne/framework/cayenne-jdk1.5-unpublished/src/test/resources/multi-tier.map.xml
Wed May 14 05:54:23 2008
@@ -33,6 +33,9 @@
 		<db-attribute name="ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
 		<db-attribute name="MAP_TO_MANY_ID" type="INTEGER"/>
 	</db-entity>
+	<db-entity name="MT_MEANINGFUL_PK">
+		<db-attribute name="PK" type="VARCHAR" isPrimaryKey="true" isMandatory="true" length="100"/>
+	</db-entity>
 	<db-entity name="MT_REFLEXIVE">
 		<db-attribute name="ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
 		<db-attribute name="NAME" type="VARCHAR" isMandatory="true" length="200"/>
@@ -76,6 +79,9 @@
 	</obj-entity>
 	<obj-entity name="MtMapToManyTarget" className="org.apache.cayenne.testdo.mt.MtMapToManyTarget"
clientClassName="org.apache.cayenne.testdo.mt.ClientMtMapToManyTarget" dbEntityName="MT_MAP_TO_MANY_TARGET">
 	</obj-entity>
+	<obj-entity name="MtMeaningfulPk" className="org.apache.cayenne.testdo.mt.MtMeaningfulPk"
clientClassName="org.apache.cayenne.testdo.mt.ClientMtMeaningfulPk" dbEntityName="MT_MEANINGFUL_PK">
+		<obj-attribute name="pk" type="java.lang.String" db-attribute-path="PK"/>
+	</obj-entity>
 	<obj-entity name="MtReflexive" className="org.apache.cayenne.testdo.mt.MtReflexive" clientClassName="org.apache.cayenne.testdo.mt.ClientMtReflexive"
dbEntityName="MT_REFLEXIVE">
 		<obj-attribute name="name" type="java.lang.String" db-attribute-path="NAME"/>
 	</obj-entity>



Mime
View raw message