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 2011/06/26 20:08:54 UTC

svn commit: r1139869 - /ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityFieldValue.java

Author: doogie
Date: Sun Jun 26 18:08:53 2011
New Revision: 1139869

URL: http://svn.apache.org/viewvc?rev=1139869&view=rev
Log:
FIX: getModelField: when fetching the ModelField, handle the
case of the field being part of a ModelViewEntity.

Modified:
    ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityFieldValue.java

Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityFieldValue.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityFieldValue.java?rev=1139869&r1=1139868&r2=1139869&view=diff
==============================================================================
--- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityFieldValue.java (original)
+++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityFieldValue.java Sun Jun 26 18:08:53 2011
@@ -123,6 +123,14 @@ public class EntityFieldValue extends En
 
     @Override
     public ModelField getModelField(ModelEntity modelEntity) {
+        if (this.modelViewEntity != null) {
+            if (this.entityAlias != null) {
+                ModelEntity memberModelEntity = modelViewEntity.getMemberModelEntity(entityAlias);
+                return getField(memberModelEntity, fieldName);
+            } else {
+                return getField(modelViewEntity, fieldName);
+            }
+        }
         return getField(modelEntity, fieldName);
     }