cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r1510304 - /cayenne/main/trunk/framework/cayenne-core-unpublished/src/main/java/org/apache/cayenne/map/EntityResolver.java
Date Sun, 04 Aug 2013 18:46:51 GMT
Author: aadamchik
Date: Sun Aug  4 18:46:50 2013
New Revision: 1510304

URL: http://svn.apache.org/r1510304
Log:
CAY-1861  Remove runtime relationships

Modified:
    cayenne/main/trunk/framework/cayenne-core-unpublished/src/main/java/org/apache/cayenne/map/EntityResolver.java

Modified: cayenne/main/trunk/framework/cayenne-core-unpublished/src/main/java/org/apache/cayenne/map/EntityResolver.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-core-unpublished/src/main/java/org/apache/cayenne/map/EntityResolver.java?rev=1510304&r1=1510303&r2=1510304&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-core-unpublished/src/main/java/org/apache/cayenne/map/EntityResolver.java
(original)
+++ cayenne/main/trunk/framework/cayenne-core-unpublished/src/main/java/org/apache/cayenne/map/EntityResolver.java
Sun Aug  4 18:46:50 2013
@@ -126,34 +126,11 @@ public class EntityResolver implements M
      * marking newly created relationships as "runtime".
      * 
      * @since 3.0
+     * @deprecated since 3.2 does nothing
      */
+    @Deprecated
     public void applyObjectLayerDefaults() {
-
-        // connect object layer
-        for (DataMap map : getDataMaps()) {
-
-            for (ObjEntity entity : map.getObjEntities()) {
-
-                // iterate by copy to avoid concurrency modification errors on
-                // reflexive
-                // relationships
-                ObjRelationship[] relationships = entity.getRelationships().toArray(
-                        new ObjRelationship[entity.getRelationships().size()]);
-                for (int i = 0; i < relationships.length; i++) {
-                    if (relationships[i].getReverseRelationship() == null) {
-                        ObjRelationship reverse = relationships[i].createReverseRelationship();
-
-                        Entity targetEntity = reverse.getSourceEntity();
-                        reverse.setName(makeUniqueRelationshipName(targetEntity));
-                        reverse.setRuntime(true);
-                        targetEntity.addRelationship(reverse);
-
-                        logger.info("added runtime complimentary ObjRelationship from " +
targetEntity.getName()
-                                + " to " + reverse.getTargetEntityName());
-                    }
-                }
-            }
-        }
+        // noop
     }
 
     private String makeUniqueRelationshipName(Entity entity) {



Mime
View raw message