You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cayenne.apache.org by "Andrus Adamchik (JIRA)" <de...@cayenne.apache.org> on 2008/02/25 09:48:16 UTC

[jira] Commented: (CAY-990) Arithmetic operators in EJBQL

    [ https://issues.apache.org/cayenne/browse/CAY-990?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12751#action_12751 ] 

Andrus Adamchik commented on CAY-990:
-------------------------------------

DataContextEJBQLConditionsTest.testArithmetics() works on MySQL, however HSQLDB throws:

NFO: SELECT t0.PAINTING_TITLE AS ec0_0, t0.ARTIST_ID AS ec0_1, t0.PAINTING_DESCRIPTION AS ec0_2, t0.ESTIMATED_PRICE AS ec0_3, t0.GALLERY_ID AS ec0_4, t0.PAINTING_ID AS ec0_5 FROM PAINTING t0 WHERE t0.ESTIMATED_PRICE < ( ? + ( ? * ?)) [bind: 1:1, 2:-4.0, 3:-1000.0]
Feb 25, 2008 10:43:17 AM org.apache.cayenne.access.QueryLogger logQueryError
INFO: *** error.
java.sql.SQLException: Unresolved parameter type : as both operands of aritmetic operator in statement [SELECT t0.PAINTING_TITLE AS ec0_0, t0.ARTIST_ID AS ec0_1, t0.PAINTING_DESCRIPTION AS ec0_2, t0.ESTIMATED_PRICE AS ec0_3, t0.GALLERY_ID AS ec0_4, t0.PAINTING_ID AS ec0_5 FROM PAINTING t0 WHERE t0.ESTIMATED_PRICE < ( ? + ( ? * ?))]
	at org.hsqldb.jdbc.Util.throwError(Unknown Source)
	at org.hsqldb.jdbc.jdbcPreparedStatement.<init>(Unknown Source)
	at org.hsqldb.jdbc.jdbcConnection.prepareStatement(Unknown Source)
	at org.apache.cayenne.conn.ConnectionWrapper.prepareStatement(ConnectionWrapper.java:274)
	at org.apache.cayenne.conn.ConnectionWrapper.prepareStatement(ConnectionWrapper.java:280)
	at org.apache.cayenne.access.TransactionConnectionDecorator.prepareStatement(TransactionConnectionDecorator.java:179)

(should we do in-memory evaluation for HSQLDB?)

> Arithmetic operators in EJBQL
> -----------------------------
>
>                 Key: CAY-990
>                 URL: https://issues.apache.org/cayenne/browse/CAY-990
>             Project: Cayenne
>          Issue Type: Task
>          Components: Cayenne Core Library
>    Affects Versions: 3.0
>            Reporter: Andrus Adamchik
>            Assignee: Andrus Adamchik
>             Fix For: 3.0
>
>
> Implement arithmetic operators in EJBQL.

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