You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "Luke Prentice (JIRA)" <ji...@apache.org> on 2008/09/17 06:15:44 UTC

[jira] Commented: (OFBIZ-1121) EntityOperator.BETWEEN generates incorrect SQL

    [ https://issues.apache.org/jira/browse/OFBIZ-1121?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12631643#action_12631643 ] 

Luke Prentice commented on OFBIZ-1121:
--------------------------------------

please see patch supplied on OFBIZ-1045. can someone integrate this please?

> EntityOperator.BETWEEN generates incorrect SQL
> ----------------------------------------------
>
>                 Key: OFBIZ-1121
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1121
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: Release Branch 4.0
>         Environment: Any
>            Reporter: Cameron Smith
>
> EntityOperator.BETWEEN generates incorrect SQL.  For
> instance, if I use something like (Java 1.5):
>  List criteria = new LinkedList();
>  criteria.add(1.0); criteria.add(10.0);
>  new EntityExpr("amount", EntityOperator.BETWEEN,
> criteria);
>  The EntityExpr, if used in a delegator query, will
> generate the following SQL:
>  ... BETWEEN (1.0, 10.0)
> However this syntax is incorrect in the following
> RDBMS:
> MySQL 5.0:
> http://dev.mysql.com/doc/refman/5.0/en/comparison-operators.html
> PostgreSQL 8.2:
> http://www.postgresql.org/docs/8.2/static/functions-comparison.html
> Oracle 9i: (couldn't be bothered to fight my way
> through Oracle's online docs but I did check my ref.
> book here and my own recollection of 8 years
> programming with Oracle).
> I originally put this problem to the ML and no-one had actually used EntityOperator.BETWEEN successfully, they had all used workarounds.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.