Is it related to the endemic NULL concept in Postgres ? Jacques
De : "Rodrigo Souza" <[EMAIL PROTECTED]> Uma lista de condiçoes vazias é desaconselhada. 2007/10/14, Adam Heath (JIRA) <[EMAIL PROTECTED]>: > > > [ > https://issues.apache.org/jira/browse/OFBIZ-1266?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12534650] > > Adam Heath commented on OFBIZ-1266: > ----------------------------------- > > Derby doesn't support FALSE in conditions? Seems like a derby > bug. However, if derby won't be supporting that any time soon, we may have > to come up with a workaround. :( > > > 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 > > > > 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. > >