cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrus Adamchik (JIRA)" <j...@apache.org>
Subject [jira] [Closed] (CAY-1933) Problems in Evaluating EJBQL Statements with Integral Literals > Integer.MAX_VALUE
Date Sat, 17 May 2014 15:57:14 GMT

     [ https://issues.apache.org/jira/browse/CAY-1933?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Andrus Adamchik closed CAY-1933.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 3.2.M2

> Problems in Evaluating EJBQL Statements with Integral Literals > Integer.MAX_VALUE
> ----------------------------------------------------------------------------------
>
>                 Key: CAY-1933
>                 URL: https://issues.apache.org/jira/browse/CAY-1933
>             Project: Cayenne
>          Issue Type: Bug
>    Affects Versions: 3.2M1
>            Reporter: Andrew Lindesay
>             Fix For: 3.2.M2
>
>         Attachments: CAY-1933_15may2014_long.patch
>
>
> A problem exists where if an integral literal is supplied in an EJBQL expression where
the string cannot be represented in a (32bit) integer, it does not attempt to instead use
a (64bit) long and raises the following error;
> {noformat}
> Caused by: org.apache.cayenne.ejbql.EJBQLException: [v.3.2.M2-SNAPSHOT May 14 2014 23:02:59]
Invalid integer: 744073709551615
> 	at org.apache.cayenne.access.translator.ejbql.EJBQLConditionTranslator.visitIntegerLiteral(EJBQLConditionTranslator.java:679)
> 	at org.apache.cayenne.ejbql.parser.EJBQLIntegerLiteral.visitNode(EJBQLIntegerLiteral.java:34)
> 	at org.apache.cayenne.ejbql.parser.SimpleNode.visit(SimpleNode.java:59)
> 	at org.apache.cayenne.ejbql.parser.SimpleNode.visitChild(SimpleNode.java:83)
> 	at org.apache.cayenne.ejbql.parser.EJBQLGreaterThan.visitChild(EJBQLGreaterThan.java:39)
> 	at org.apache.cayenne.ejbql.parser.SimpleNode.visit(SimpleNode.java:63)
> {noformat}
> This patch maintains _existing_ behaviour for literals that can be expressed as integers
(INTEGER), but will instead use longs (BIGINT) for cases where the number is not able to be
expressed as an integer.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message