You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by do...@apache.org on 2012/05/29 06:09:54 UTC

svn commit: r1343471 - in /ofbiz/trunk/framework/entity/src/org/ofbiz/entity: Delegator.java GenericDelegator.java

Author: doogie
Date: Tue May 29 04:09:53 2012
New Revision: 1343471

URL: http://svn.apache.org/viewvc?rev=1343471&view=rev
Log:
FIX: Found a local case of findByPrimaryKey usage.

Modified:
    ofbiz/trunk/framework/entity/src/org/ofbiz/entity/Delegator.java
    ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericDelegator.java

Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/Delegator.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/Delegator.java?rev=1343471&r1=1343470&r2=1343471&view=diff
==============================================================================
--- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/Delegator.java (original)
+++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/Delegator.java Tue May 29 04:09:53 2012
@@ -812,7 +812,7 @@ public interface Delegator {
     public GenericPK getRelatedDummyPK(String relationName, Map<String, ? extends Object> byAndFields, GenericValue value) throws GenericEntityException;
 
     /**
-     * Get related entity where relation is of type one, uses findByPrimaryKey
+     * Get related entity where relation is of type one, uses findOne
      * NOTE 20080502: 7 references
      *
      * @throws IllegalArgumentException
@@ -821,7 +821,7 @@ public interface Delegator {
     public GenericValue getRelatedOne(String relationName, GenericValue value) throws GenericEntityException;
 
     /**
-     * Get related entity where relation is of type one, uses findByPrimaryKey,
+     * Get related entity where relation is of type one, uses findOne
      * checking first in the cache to see if the desired value is there NOTE
      * 20080502: 1 references
      *

Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericDelegator.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericDelegator.java?rev=1343471&r1=1343470&r2=1343471&view=diff
==============================================================================
--- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericDelegator.java (original)
+++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericDelegator.java Tue May 29 04:09:53 2012
@@ -2030,7 +2030,7 @@ public class GenericDelegator implements
             fields.put(keyMap.getRelFieldName(), value.get(keyMap.getFieldName()));
         }
 
-        return this.findByPrimaryKey(relation.getRelEntityName(), fields);
+        return this.findOne(relation.getRelEntityName(), fields, false);
     }
 
     /* (non-Javadoc)
@@ -2053,7 +2053,7 @@ public class GenericDelegator implements
             fields.put(keyMap.getRelFieldName(), value.get(keyMap.getFieldName()));
         }
 
-        return this.findByPrimaryKeyCache(relation.getRelEntityName(), fields);
+        return this.findOne(relation.getRelEntityName(), fields, true);
     }