diff --git a/framework/entity/src/org/ofbiz/entity/condition/EntityComparisonOperator.java b/framework/entity/src/org/ofbiz/entity/condition/EntityComparisonOperator.java index e71269336c..c9cd38d6bf 100644 --- a/framework/entity/src/org/ofbiz/entity/condition/EntityComparisonOperator.java +++ b/framework/entity/src/org/ofbiz/entity/condition/EntityComparisonOperator.java @@ -87,9 +87,9 @@ public class EntityComparisonOperator extends EntityOperator { public void addSqlValue(StringBuilder sql, ModelEntity entity, List entityConditionParams, boolean compat, Object lhs, Object rhs, DatasourceInfo datasourceInfo) { //Debug.logInfo("EntityComparisonOperator.addSqlValue field=" + lhs + ", value=" + rhs + ", value type=" + (rhs == null ? "null object" : rhs.getClass().getName()), module); - // if this is an IN operator and the rhs Object isEmpty, add "FALSE" instead of the normal SQL + // if this is an IN operator and the rhs Object isEmpty, add "1=0" instead of the normal SQL. Note that "FALSE" does not work with all databases. if (this.idInt == EntityOperator.ID_IN && UtilValidate.isEmpty(rhs)) { - sql.append("FALSE"); + sql.append("1=0"); return; }