cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrey Razumovsky (JIRA)" <j...@apache.org>
Subject [jira] Created: (CAY-1417) EJBQL doesn't support null numeric parameters
Date Wed, 07 Apr 2010 11:39:33 GMT
EJBQL doesn't support null numeric parameters
---------------------------------------------

                 Key: CAY-1417
                 URL: https://issues.apache.org/jira/browse/CAY-1417
             Project: Cayenne
          Issue Type: Bug
            Reporter: Andrey Razumovsky
            Assignee: Andrey Razumovsky
            Priority: Minor
             Fix For: 3.0.1


Per CAY-1305 null values were supported for named parameters. Now need to do same for numeric
parameters

public void testNullPositionalParameter() {
        EJBQLQuery query = new EJBQLQuery("select p from Painting p WHERE p.toArtist=?1");
        query.setParameter(1, null);
        createDataContext().performQuery(query);
    }


java.lang.ClassCastException: org.apache.cayenne.ejbql.parser.EJBQLPositionalInputParameter
cannot be cast to org.apache.cayenne.ejbql.parser.EJBQLNamedInputParameter
	at org.apache.cayenne.access.jdbc.EJBQLConditionTranslator.processParameter(EJBQLConditionTranslator.java:821)
	at org.apache.cayenne.access.jdbc.EJBQLConditionTranslator.visitPositionalInputParameter(EJBQLConditionTranslator.java:749)
	at org.apache.cayenne.ejbql.parser.EJBQLPositionalInputParameter.visitNode(EJBQLPositionalInputParameter.java:34)

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


Mime
View raw message