cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r566133 - /cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/map/ObjEntity.java
Date Wed, 15 Aug 2007 12:49:44 GMT
Author: aadamchik
Date: Wed Aug 15 05:49:43 2007
New Revision: 566133

URL: http://svn.apache.org/viewvc?view=rev&rev=566133
Log:
CAY-843 Remove arbitrary reverse relationship mapping limitations 
(excluding runtime relationships on the client)

Modified:
    cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/map/ObjEntity.java

Modified: cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/map/ObjEntity.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/map/ObjEntity.java?view=diff&rev=566133&r1=566132&r2=566133
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/map/ObjEntity.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/map/ObjEntity.java
Wed Aug 15 05:49:43 2007
@@ -188,11 +188,14 @@
             entity.addAttribute(attribute.getClientAttribute());
         }
 
-        // copy relationships
+        // copy relationships; skip runtime generated relationships
         Iterator relationships = getDeclaredRelationships().iterator();
         while (relationships.hasNext()) {
             ObjRelationship relationship = (ObjRelationship) relationships.next();
-            entity.addRelationship(relationship.getClientRelationship());
+
+            if (!relationship.isRuntime()) {
+                entity.addRelationship(relationship.getClientRelationship());
+            }
         }
 
         // TODO: andrus 2/5/2007 - copy embeddables



Mime
View raw message