Author: erwan
Date: Mon Jun 21 13:08:30 2010
New Revision: 956565
URL: http://svn.apache.org/viewvc?rev=956565&view=rev
Log:
Adding null condition when using entity-condition in views
Modified:
ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelViewEntity.java
Modified:
ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelViewEntity.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelViewEntity.java?rev=956565&r1=956564&r2=956565&view=diff
==============================================================================
---
ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelViewEntity.java
(original)
+++
ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelViewEntity.java
Mon Jun 21 13:08:30 2010
@@ -1300,6 +1300,8 @@ public class ModelViewEntity extends Mod
EntityOperator.OR,
EntityCondition.makeCondition(lhs,
EntityOperator.EQUALS, null));
}
+ } else if ( value == null &&
(operator.equals(EntityOperator.EQUALS) ||
operator.equals(EntityOperator.NOT_EQUAL))) {
+ return EntityCondition.makeCondition(lhs,
UtilGenerics.<EntityComparisonOperator<?,?>>cast(operator), null);
} else {
if (ignoreCase) {
// use the stuff to upper case both sides