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.

Reply via email to