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 2007/05/31 00:22:15 UTC

[jira] Created: (OFBIZ-1045) EntityOperator does not correctly construct SQL for BETWEEN clause

EntityOperator does not correctly construct SQL for BETWEEN clause
------------------------------------------------------------------

                 Key: OFBIZ-1045
                 URL: https://issues.apache.org/jira/browse/OFBIZ-1045
             Project: OFBiz (The Open for Business Project)
          Issue Type: Bug
          Components: framework
    Affects Versions: SVN trunk
         Environment: ubuntu 7.04, postgres 8.2, working with SVN release 4955, but EntityOperator.java has not changed since then.
            Reporter: Luke Prentice


when using the BETWEEN EntityOperator the SQL produced is incorrectly formatted:
... field1 BETWEEN (value1, value2)
it should be
... field1 BETWEEN value1 AND value2

this produces an SQL parse exception.

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


[jira] Assigned: (OFBIZ-1045) EntityOperator does not correctly construct SQL for BETWEEN clause

Posted by "Adam Heath (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OFBIZ-1045?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Adam Heath reassigned OFBIZ-1045:
---------------------------------

    Assignee: Adam Heath

> EntityOperator does not correctly construct SQL for BETWEEN clause
> ------------------------------------------------------------------
>
>                 Key: OFBIZ-1045
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1045
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: SVN trunk
>         Environment: ubuntu 7.04, postgres 8.2, working with SVN release 4955, but EntityOperator.java has not changed since then.
>            Reporter: Luke Prentice
>            Assignee: Adam Heath
>         Attachments: all-app-framework-EntityOperator.java.diff, all-app-framework-EntityOperator.java.diff, all-app-framework-EntityOperator.java.diff
>
>
> when using the BETWEEN EntityOperator the SQL produced is incorrectly formatted:
> ... field1 BETWEEN (value1, value2)
> it should be
> ... field1 BETWEEN value1 AND value2
> this produces an SQL parse exception.

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


[jira] Updated: (OFBIZ-1045) EntityOperator does not correctly construct SQL for BETWEEN clause

Posted by "Luke Prentice (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OFBIZ-1045?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Luke Prentice updated OFBIZ-1045:
---------------------------------

    Attachment:     (was: all-app-framework-EntityOperator.java.diff)

> EntityOperator does not correctly construct SQL for BETWEEN clause
> ------------------------------------------------------------------
>
>                 Key: OFBIZ-1045
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1045
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: SVN trunk
>         Environment: ubuntu 7.04, postgres 8.2, working with SVN release 4955, but EntityOperator.java has not changed since then.
>            Reporter: Luke Prentice
>            Assignee: Adam Heath
>         Attachments: EntityOperator-r694561.patch
>
>
> when using the BETWEEN EntityOperator the SQL produced is incorrectly formatted:
> ... field1 BETWEEN (value1, value2)
> it should be
> ... field1 BETWEEN value1 AND value2
> this produces an SQL parse exception.

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


[jira] Closed: (OFBIZ-1045) EntityOperator does not correctly construct SQL for BETWEEN clause

Posted by "Jacques Le Roux (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OFBIZ-1045?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jacques Le Roux closed OFBIZ-1045.
----------------------------------

       Resolution: Fixed
    Fix Version/s: Release Branch 4.0
                   SVN trunk

Thanks Luke,

Your patch is in OFBiz tunk revision: 721887, release4.0 721892  

I have also made a modification for widget action in trunk r721839, R4 r721893  


> EntityOperator does not correctly construct SQL for BETWEEN clause
> ------------------------------------------------------------------
>
>                 Key: OFBIZ-1045
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1045
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: SVN trunk
>         Environment: ubuntu 7.04, postgres 8.2, working with SVN release 4955, but EntityOperator.java has not changed since then. fix for vesion 694561
>            Reporter: Luke Prentice
>            Assignee: Jacques Le Roux
>             Fix For: SVN trunk, Release Branch 4.0
>
>         Attachments: EntityOperator-r694561.patch
>
>
> when using the BETWEEN EntityOperator the SQL produced is incorrectly formatted:
> ... field1 BETWEEN (value1, value2)
> it should be
> ... field1 BETWEEN value1 AND value2
> this produces an SQL parse exception.

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


[jira] Commented: (OFBIZ-1045) EntityOperator does not correctly construct SQL for BETWEEN clause

Posted by "Jacques Le Roux (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12651873#action_12651873 ] 

Jacques Le Roux commented on OFBIZ-1045:
----------------------------------------

Luke,

I forgot your remark about call to makeRHSWhereStringValue() in EntityOperator.java  "IN"'s, done in trun r721904, R4 r721905  



> EntityOperator does not correctly construct SQL for BETWEEN clause
> ------------------------------------------------------------------
>
>                 Key: OFBIZ-1045
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1045
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: SVN trunk
>         Environment: ubuntu 7.04, postgres 8.2, working with SVN release 4955, but EntityOperator.java has not changed since then. fix for vesion 694561
>            Reporter: Luke Prentice
>            Assignee: Jacques Le Roux
>             Fix For: SVN trunk, Release Branch 4.0
>
>         Attachments: EntityOperator-r694561.patch
>
>
> when using the BETWEEN EntityOperator the SQL produced is incorrectly formatted:
> ... field1 BETWEEN (value1, value2)
> it should be
> ... field1 BETWEEN value1 AND value2
> this produces an SQL parse exception.

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


[jira] Commented: (OFBIZ-1045) EntityOperator does not correctly construct SQL for BETWEEN clause

Posted by "Luke Prentice (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12539802 ] 

Luke Prentice commented on OFBIZ-1045:
--------------------------------------

hi jacopo,

as the submitter of the patch i'm not sure i qualify, but we have tested it
and are using it in our live systems.

thanks, luke.



> EntityOperator does not correctly construct SQL for BETWEEN clause
> ------------------------------------------------------------------
>
>                 Key: OFBIZ-1045
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1045
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: SVN trunk
>         Environment: ubuntu 7.04, postgres 8.2, working with SVN release 4955, but EntityOperator.java has not changed since then.
>            Reporter: Luke Prentice
>            Assignee: Adam Heath
>         Attachments: all-app-framework-EntityOperator.java.diff, all-app-framework-EntityOperator.java.diff, all-app-framework-EntityOperator.java.diff
>
>
> when using the BETWEEN EntityOperator the SQL produced is incorrectly formatted:
> ... field1 BETWEEN (value1, value2)
> it should be
> ... field1 BETWEEN value1 AND value2
> this produces an SQL parse exception.

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


[jira] Assigned: (OFBIZ-1045) EntityOperator does not correctly construct SQL for BETWEEN clause

Posted by "Jacques Le Roux (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OFBIZ-1045?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jacques Le Roux reassigned OFBIZ-1045:
--------------------------------------

    Assignee: Jacques Le Roux  (was: Adam Heath)

> EntityOperator does not correctly construct SQL for BETWEEN clause
> ------------------------------------------------------------------
>
>                 Key: OFBIZ-1045
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1045
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: SVN trunk
>         Environment: ubuntu 7.04, postgres 8.2, working with SVN release 4955, but EntityOperator.java has not changed since then. fix for vesion 694561
>            Reporter: Luke Prentice
>            Assignee: Jacques Le Roux
>         Attachments: EntityOperator-r694561.patch
>
>
> when using the BETWEEN EntityOperator the SQL produced is incorrectly formatted:
> ... field1 BETWEEN (value1, value2)
> it should be
> ... field1 BETWEEN value1 AND value2
> this produces an SQL parse exception.

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


[jira] Commented: (OFBIZ-1045) EntityOperator does not correctly construct SQL for BETWEEN clause

Posted by "Jacques Le Roux (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12643996#action_12643996 ] 

Jacques Le Roux commented on OFBIZ-1045:
----------------------------------------

Luke,

Why did you not fix the "IN" and "NOT-LIKE" ? Is there not the same problems for them (ie did you test them) ?
Also a written example of use would make things easier.

Thanks

> EntityOperator does not correctly construct SQL for BETWEEN clause
> ------------------------------------------------------------------
>
>                 Key: OFBIZ-1045
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1045
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: SVN trunk
>         Environment: ubuntu 7.04, postgres 8.2, working with SVN release 4955, but EntityOperator.java has not changed since then. fix for vesion 694561
>            Reporter: Luke Prentice
>            Assignee: Adam Heath
>         Attachments: EntityOperator-r694561.patch
>
>
> when using the BETWEEN EntityOperator the SQL produced is incorrectly formatted:
> ... field1 BETWEEN (value1, value2)
> it should be
> ... field1 BETWEEN value1 AND value2
> this produces an SQL parse exception.

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


[jira] Updated: (OFBIZ-1045) EntityOperator does not correctly construct SQL for BETWEEN clause

Posted by "Luke Prentice (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OFBIZ-1045?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Luke Prentice updated OFBIZ-1045:
---------------------------------

    Attachment: EntityOperator-r694561.patch

patch to fix construction of "BETWEEN" sql query.

> EntityOperator does not correctly construct SQL for BETWEEN clause
> ------------------------------------------------------------------
>
>                 Key: OFBIZ-1045
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1045
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: SVN trunk
>         Environment: ubuntu 7.04, postgres 8.2, working with SVN release 4955, but EntityOperator.java has not changed since then.
>            Reporter: Luke Prentice
>            Assignee: Adam Heath
>         Attachments: EntityOperator-r694561.patch
>
>
> when using the BETWEEN EntityOperator the SQL produced is incorrectly formatted:
> ... field1 BETWEEN (value1, value2)
> it should be
> ... field1 BETWEEN value1 AND value2
> this produces an SQL parse exception.

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


[jira] Commented: (OFBIZ-1045) EntityOperator does not correctly construct SQL for BETWEEN clause

Posted by "Luke Prentice (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12539803 ] 

Luke Prentice commented on OFBIZ-1045:
--------------------------------------

this is the command we used (some time ago!) to get our ofbiz tree:

svn checkout -r 4955 http://svn.ofbiz.org/svn/ofbiz/trunk ofbiz



> EntityOperator does not correctly construct SQL for BETWEEN clause
> ------------------------------------------------------------------
>
>                 Key: OFBIZ-1045
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1045
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: SVN trunk
>         Environment: ubuntu 7.04, postgres 8.2, working with SVN release 4955, but EntityOperator.java has not changed since then.
>            Reporter: Luke Prentice
>            Assignee: Adam Heath
>         Attachments: all-app-framework-EntityOperator.java.diff, all-app-framework-EntityOperator.java.diff, all-app-framework-EntityOperator.java.diff
>
>
> when using the BETWEEN EntityOperator the SQL produced is incorrectly formatted:
> ... field1 BETWEEN (value1, value2)
> it should be
> ... field1 BETWEEN value1 AND value2
> this produces an SQL parse exception.

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


[jira] Commented: (OFBIZ-1045) EntityOperator does not correctly construct SQL for BETWEEN clause

Posted by "Jacopo Cappellato (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12527699 ] 

Jacopo Cappellato commented on OFBIZ-1045:
------------------------------------------

Is there anyone interested in this patch and willing to use it / test it and review it? This would really help the committers.

> EntityOperator does not correctly construct SQL for BETWEEN clause
> ------------------------------------------------------------------
>
>                 Key: OFBIZ-1045
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1045
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: SVN trunk
>         Environment: ubuntu 7.04, postgres 8.2, working with SVN release 4955, but EntityOperator.java has not changed since then.
>            Reporter: Luke Prentice
>         Attachments: all-app-framework-EntityOperator.java.diff, all-app-framework-EntityOperator.java.diff, all-app-framework-EntityOperator.java.diff
>
>
> when using the BETWEEN EntityOperator the SQL produced is incorrectly formatted:
> ... field1 BETWEEN (value1, value2)
> it should be
> ... field1 BETWEEN value1 AND value2
> this produces an SQL parse exception.

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


[jira] Commented: (OFBIZ-1045) EntityOperator does not correctly construct SQL for BETWEEN clause

Posted by "Jacques Le Roux (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12539941 ] 

Jacques Le Roux commented on OFBIZ-1045:
----------------------------------------

Hi Luke,

This is the pre-Apache repository. We use now http://docs.ofbiz.org/display/OFBADMIN/Source+Repository+and+Access

Thanks

> EntityOperator does not correctly construct SQL for BETWEEN clause
> ------------------------------------------------------------------
>
>                 Key: OFBIZ-1045
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1045
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: SVN trunk
>         Environment: ubuntu 7.04, postgres 8.2, working with SVN release 4955, but EntityOperator.java has not changed since then.
>            Reporter: Luke Prentice
>            Assignee: Adam Heath
>         Attachments: all-app-framework-EntityOperator.java.diff, all-app-framework-EntityOperator.java.diff, all-app-framework-EntityOperator.java.diff
>
>
> when using the BETWEEN EntityOperator the SQL produced is incorrectly formatted:
> ... field1 BETWEEN (value1, value2)
> it should be
> ... field1 BETWEEN value1 AND value2
> this produces an SQL parse exception.

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


[jira] Commented: (OFBIZ-1045) EntityOperator does not correctly construct SQL for BETWEEN clause

Posted by "Cameron Smith (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12527711 ] 

Cameron Smith commented on OFBIZ-1045:
--------------------------------------

I will test this, and then report back.  Cameron

> EntityOperator does not correctly construct SQL for BETWEEN clause
> ------------------------------------------------------------------
>
>                 Key: OFBIZ-1045
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1045
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: SVN trunk
>         Environment: ubuntu 7.04, postgres 8.2, working with SVN release 4955, but EntityOperator.java has not changed since then.
>            Reporter: Luke Prentice
>         Attachments: all-app-framework-EntityOperator.java.diff, all-app-framework-EntityOperator.java.diff, all-app-framework-EntityOperator.java.diff
>
>
> when using the BETWEEN EntityOperator the SQL produced is incorrectly formatted:
> ... field1 BETWEEN (value1, value2)
> it should be
> ... field1 BETWEEN value1 AND value2
> this produces an SQL parse exception.

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


[jira] Commented: (OFBIZ-1045) EntityOperator does not correctly construct SQL for BETWEEN clause

Posted by "Luke Prentice (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12500247 ] 

Luke Prentice commented on OFBIZ-1045:
--------------------------------------

as i am working with an old SVN release (4955) i will not commit to the SVN trunk, rather just submit my patch for 4955 and for 7941.

> EntityOperator does not correctly construct SQL for BETWEEN clause
> ------------------------------------------------------------------
>
>                 Key: OFBIZ-1045
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1045
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: SVN trunk
>         Environment: ubuntu 7.04, postgres 8.2, working with SVN release 4955, but EntityOperator.java has not changed since then.
>            Reporter: Luke Prentice
>
> when using the BETWEEN EntityOperator the SQL produced is incorrectly formatted:
> ... field1 BETWEEN (value1, value2)
> it should be
> ... field1 BETWEEN value1 AND value2
> this produces an SQL parse exception.

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


[jira] Updated: (OFBIZ-1045) EntityOperator does not correctly construct SQL for BETWEEN clause

Posted by "Luke Prentice (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OFBIZ-1045?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Luke Prentice updated OFBIZ-1045:
---------------------------------

    Attachment: all-app-framework-EntityOperator.java.diff

patch for 4955

this adds a new constructor for the BETWEEN operator

    public static final EntityComparisonOperator BETWEEN = new EntityComparisonOperator(ID_BETWEEN, "BETWEEN") {
        public boolean compare(Object lhs, Object rhs) { return EntityComparisonOperator.compareIn(lhs, rhs); }
        protected void makeRHSWhereStringValue(ModelEntity entity, List entityConditionParams, StringBuffer sb, ModelField field, Object rhs) { appendRHSBetweenList(entityConditionParams, sb, field, rhs); }
    };
    static { register( "between", BETWEEN ); }

with an associated helper method appendRHSBetweenList()

    protected void appendRHSBetweenList(List entityConditionParams, StringBuffer whereStringBuffer, ModelField field, Object rhs) {
        if (rhs instanceof Collection) {
            Iterator rhsIter = ((Collection) rhs).iterator();

            while (rhsIter.hasNext()) {
                Object inObj = rhsIter.next();

                addValue(whereStringBuffer, field, inObj, entityConditionParams);
                if (rhsIter.hasNext()) {
                    whereStringBuffer.append(" AND ");
                }
            }
        } else {
            addValue(whereStringBuffer, field, rhs, entityConditionParams);
        }
    }


> EntityOperator does not correctly construct SQL for BETWEEN clause
> ------------------------------------------------------------------
>
>                 Key: OFBIZ-1045
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1045
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: SVN trunk
>         Environment: ubuntu 7.04, postgres 8.2, working with SVN release 4955, but EntityOperator.java has not changed since then.
>            Reporter: Luke Prentice
>         Attachments: all-app-framework-EntityOperator.java.diff
>
>
> when using the BETWEEN EntityOperator the SQL produced is incorrectly formatted:
> ... field1 BETWEEN (value1, value2)
> it should be
> ... field1 BETWEEN value1 AND value2
> this produces an SQL parse exception.

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


[jira] Commented: (OFBIZ-1045) EntityOperator does not correctly construct SQL for BETWEEN clause

Posted by "Luke Prentice (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12643086#action_12643086 ] 

Luke Prentice commented on OFBIZ-1045:
--------------------------------------

jacques, what's not clear to you?

a problem has been identified, and a patch supplied to fix the SQL incorrect syntax when using the "BETWEEN" operator.

> EntityOperator does not correctly construct SQL for BETWEEN clause
> ------------------------------------------------------------------
>
>                 Key: OFBIZ-1045
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1045
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: SVN trunk
>         Environment: ubuntu 7.04, postgres 8.2, working with SVN release 4955, but EntityOperator.java has not changed since then. fix for vesion 694561
>            Reporter: Luke Prentice
>            Assignee: Adam Heath
>         Attachments: EntityOperator-r694561.patch
>
>
> when using the BETWEEN EntityOperator the SQL produced is incorrectly formatted:
> ... field1 BETWEEN (value1, value2)
> it should be
> ... field1 BETWEEN value1 AND value2
> this produces an SQL parse exception.

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


[jira] Updated: (OFBIZ-1045) EntityOperator does not correctly construct SQL for BETWEEN clause

Posted by "Luke Prentice (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OFBIZ-1045?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Luke Prentice updated OFBIZ-1045:
---------------------------------

    Environment: ubuntu 7.04, postgres 8.2, working with SVN release 4955, but EntityOperator.java has not changed since then. fix for vesion 694561  (was: ubuntu 7.04, postgres 8.2, working with SVN release 4955, but EntityOperator.java has not changed since then.)

> EntityOperator does not correctly construct SQL for BETWEEN clause
> ------------------------------------------------------------------
>
>                 Key: OFBIZ-1045
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1045
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: SVN trunk
>         Environment: ubuntu 7.04, postgres 8.2, working with SVN release 4955, but EntityOperator.java has not changed since then. fix for vesion 694561
>            Reporter: Luke Prentice
>            Assignee: Adam Heath
>         Attachments: EntityOperator-r694561.patch
>
>
> when using the BETWEEN EntityOperator the SQL produced is incorrectly formatted:
> ... field1 BETWEEN (value1, value2)
> it should be
> ... field1 BETWEEN value1 AND value2
> this produces an SQL parse exception.

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


[jira] Commented: (OFBIZ-1045) EntityOperator does not correctly construct SQL for BETWEEN clause

Posted by "Jacques Le Roux (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12643070#action_12643070 ] 

Jacques Le Roux commented on OFBIZ-1045:
----------------------------------------

I'm looking at this but it's not yet completly clear to me...

> EntityOperator does not correctly construct SQL for BETWEEN clause
> ------------------------------------------------------------------
>
>                 Key: OFBIZ-1045
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1045
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: SVN trunk
>         Environment: ubuntu 7.04, postgres 8.2, working with SVN release 4955, but EntityOperator.java has not changed since then. fix for vesion 694561
>            Reporter: Luke Prentice
>            Assignee: Adam Heath
>         Attachments: EntityOperator-r694561.patch
>
>
> when using the BETWEEN EntityOperator the SQL produced is incorrectly formatted:
> ... field1 BETWEEN (value1, value2)
> it should be
> ... field1 BETWEEN value1 AND value2
> this produces an SQL parse exception.

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


[jira] Updated: (OFBIZ-1045) EntityOperator does not correctly construct SQL for BETWEEN clause

Posted by "Luke Prentice (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OFBIZ-1045?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Luke Prentice updated OFBIZ-1045:
---------------------------------

    Attachment: all-app-framework-EntityOperator.java.diff

i meant to allow ASF on previous attachment

> EntityOperator does not correctly construct SQL for BETWEEN clause
> ------------------------------------------------------------------
>
>                 Key: OFBIZ-1045
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1045
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: SVN trunk
>         Environment: ubuntu 7.04, postgres 8.2, working with SVN release 4955, but EntityOperator.java has not changed since then.
>            Reporter: Luke Prentice
>         Attachments: all-app-framework-EntityOperator.java.diff, all-app-framework-EntityOperator.java.diff, all-app-framework-EntityOperator.java.diff
>
>
> when using the BETWEEN EntityOperator the SQL produced is incorrectly formatted:
> ... field1 BETWEEN (value1, value2)
> it should be
> ... field1 BETWEEN value1 AND value2
> this produces an SQL parse exception.

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


[jira] Updated: (OFBIZ-1045) EntityOperator does not correctly construct SQL for BETWEEN clause

Posted by "Luke Prentice (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OFBIZ-1045?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Luke Prentice updated OFBIZ-1045:
---------------------------------

    Attachment: all-app-framework-EntityOperator.java.diff

the same patch works for 7941 (offset)

please integrate this into the trunk.

> EntityOperator does not correctly construct SQL for BETWEEN clause
> ------------------------------------------------------------------
>
>                 Key: OFBIZ-1045
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1045
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: SVN trunk
>         Environment: ubuntu 7.04, postgres 8.2, working with SVN release 4955, but EntityOperator.java has not changed since then.
>            Reporter: Luke Prentice
>         Attachments: all-app-framework-EntityOperator.java.diff, all-app-framework-EntityOperator.java.diff
>
>
> when using the BETWEEN EntityOperator the SQL produced is incorrectly formatted:
> ... field1 BETWEEN (value1, value2)
> it should be
> ... field1 BETWEEN value1 AND value2
> this produces an SQL parse exception.

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


[jira] Commented: (OFBIZ-1045) EntityOperator does not correctly construct SQL for BETWEEN clause

Posted by "Jacques Le Roux (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12632820#action_12632820 ] 

Jacques Le Roux commented on OFBIZ-1045:
----------------------------------------

Hopefully Adam will have a look. Else I will but later, please be patient...

> EntityOperator does not correctly construct SQL for BETWEEN clause
> ------------------------------------------------------------------
>
>                 Key: OFBIZ-1045
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1045
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: SVN trunk
>         Environment: ubuntu 7.04, postgres 8.2, working with SVN release 4955, but EntityOperator.java has not changed since then. fix for vesion 694561
>            Reporter: Luke Prentice
>            Assignee: Adam Heath
>         Attachments: EntityOperator-r694561.patch
>
>
> when using the BETWEEN EntityOperator the SQL produced is incorrectly formatted:
> ... field1 BETWEEN (value1, value2)
> it should be
> ... field1 BETWEEN value1 AND value2
> this produces an SQL parse exception.

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


[jira] Commented: (OFBIZ-1045) EntityOperator does not correctly construct SQL for BETWEEN clause

Posted by "Luke Prentice (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12630930#action_12630930 ] 

Luke Prentice commented on OFBIZ-1045:
--------------------------------------

please find a new patch attached which fixes the problem.

there are 2 issues here:
 1. in EntityOperator.java makeRHSWhereStringValue() is not called for "IN" and "NOT-LIKE" comparisons because makeRHSWhereStringValue() in EntityComparisonOperator.java has 6 parameters, not 5. (it includes DatasourceInfo). we have corrected this in EntityOperator.java by giving the call to makeRHSWhereStringValue() have an additional parameter.
 2. in EntityOperator.java the "BETWEEN" comparitor had no further qualification, so we have written appendRHSBetweenList() to correctly construct the SQL.

note: another patch to EntityOperator.java giving "IN"'s call to makeRHSWhereStringValue() an additional parameter would mean the correct method is called.



> EntityOperator does not correctly construct SQL for BETWEEN clause
> ------------------------------------------------------------------
>
>                 Key: OFBIZ-1045
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1045
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: SVN trunk
>         Environment: ubuntu 7.04, postgres 8.2, working with SVN release 4955, but EntityOperator.java has not changed since then.
>            Reporter: Luke Prentice
>            Assignee: Adam Heath
>         Attachments: all-app-framework-EntityOperator.java.diff, all-app-framework-EntityOperator.java.diff, all-app-framework-EntityOperator.java.diff
>
>
> when using the BETWEEN EntityOperator the SQL produced is incorrectly formatted:
> ... field1 BETWEEN (value1, value2)
> it should be
> ... field1 BETWEEN value1 AND value2
> this produces an SQL parse exception.

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


[jira] Commented: (OFBIZ-1045) EntityOperator does not correctly construct SQL for BETWEEN clause

Posted by "Luke Prentice (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12631645#action_12631645 ] 

Luke Prentice commented on OFBIZ-1045:
--------------------------------------

patch is for SVN version 694561

> EntityOperator does not correctly construct SQL for BETWEEN clause
> ------------------------------------------------------------------
>
>                 Key: OFBIZ-1045
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1045
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: SVN trunk
>         Environment: ubuntu 7.04, postgres 8.2, working with SVN release 4955, but EntityOperator.java has not changed since then. fix for vesion 694561
>            Reporter: Luke Prentice
>            Assignee: Adam Heath
>         Attachments: EntityOperator-r694561.patch
>
>
> when using the BETWEEN EntityOperator the SQL produced is incorrectly formatted:
> ... field1 BETWEEN (value1, value2)
> it should be
> ... field1 BETWEEN value1 AND value2
> this produces an SQL parse exception.

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


[jira] Commented: (OFBIZ-1045) EntityOperator does not correctly construct SQL for BETWEEN clause

Posted by "Jacques Le Roux (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12547321 ] 

Jacques Le Roux commented on OFBIZ-1045:
----------------------------------------

Sorry Luke but we need a new patch now as EntityOperator.java as recently changed : http://fisheye6.cenqua.com/browse/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityOperator.java

Thanks

> EntityOperator does not correctly construct SQL for BETWEEN clause
> ------------------------------------------------------------------
>
>                 Key: OFBIZ-1045
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1045
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: SVN trunk
>         Environment: ubuntu 7.04, postgres 8.2, working with SVN release 4955, but EntityOperator.java has not changed since then.
>            Reporter: Luke Prentice
>            Assignee: Adam Heath
>         Attachments: all-app-framework-EntityOperator.java.diff, all-app-framework-EntityOperator.java.diff, all-app-framework-EntityOperator.java.diff
>
>
> when using the BETWEEN EntityOperator the SQL produced is incorrectly formatted:
> ... field1 BETWEEN (value1, value2)
> it should be
> ... field1 BETWEEN value1 AND value2
> this produces an SQL parse exception.

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


[jira] Commented: (OFBIZ-1045) EntityOperator does not correctly construct SQL for BETWEEN clause

Posted by "Cameron Smith (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12527722 ] 

Cameron Smith commented on OFBIZ-1045:
--------------------------------------

I am afraid it didn't work for me.
 a. The patch was not relative to ofbiz root dir, but I corrected that before applying it, and then rebuilt ofbiz-entity.jar
 b. Incorrect SQL was still being generated.  When I debugged, the overridden makeRHSWhereStringValue() declaration in the anonymous class, was not being called.  I can only imagine this is because you and I are working from different trunks.

We use our own version of OFBiz, based on http://svn.apache.org/repos/asf/ofbiz/branches/release4.0, which was last merged with this branch at r545673.    I have to say I don't recognize your tags 4955 and 7941, they seem very old, what repository are you working with Luke?

> EntityOperator does not correctly construct SQL for BETWEEN clause
> ------------------------------------------------------------------
>
>                 Key: OFBIZ-1045
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1045
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: SVN trunk
>         Environment: ubuntu 7.04, postgres 8.2, working with SVN release 4955, but EntityOperator.java has not changed since then.
>            Reporter: Luke Prentice
>         Attachments: all-app-framework-EntityOperator.java.diff, all-app-framework-EntityOperator.java.diff, all-app-framework-EntityOperator.java.diff
>
>
> when using the BETWEEN EntityOperator the SQL produced is incorrectly formatted:
> ... field1 BETWEEN (value1, value2)
> it should be
> ... field1 BETWEEN value1 AND value2
> this produces an SQL parse exception.

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