[ https://issues.apache.org/jira/browse/OFBIZ-1266?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12680218#action_12680218 ]
Wickersheimer Jeremy commented on OFBIZ-1266: --------------------------------------------- This bug also affects Oracle databases, the problem is the same as in Derby, boolean types are not supported. Why not just change the 'FALSE' to '0=1' and then work with all the databases that do not support booleans ? > EntityOperator.IN will crash on some databases with empty list > -------------------------------------------------------------- > > Key: OFBIZ-1266 > URL: https://issues.apache.org/jira/browse/OFBIZ-1266 > Project: OFBiz > Issue Type: Bug > Components: framework > Affects Versions: SVN trunk > Environment: derby, unkown other databases > Reporter: Leon Torres > Assignee: Adam Heath > > If you use the following entity exr, > new EntityExpr("orderId", EntityOperator.IN, new ArrayList()); > It will crash on at least Derby. The reason is that this condition evaluates > to the keyword FALSE, which apparently is not supported on Derby. The > problem code is in EntityComparisonOperator.java: > // if this is an IN operator and the rhs Object isEmpty, add "FALSE" > instead of the normal SQL > if (this.idInt == EntityOperator.ID_IN && UtilValidate.isEmpty(rhs)) { > sql.append("FALSE"); > return; > } > Perhaps this is over engineered? What happens if we just leave this out and > let it generate an "IN ()" SQL? -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.