You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by "Marek Šabo (JIRA)" <ji...@apache.org> on 2010/11/23 19:05:16 UTC

[jira] Updated: (CAY-1514) ClassCastException when EJQLQuery parameters is null.

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

Marek Šabo updated CAY-1514:
----------------------------

    Attachment: cayST.txt

Full stack trace of thrown exception.

> ClassCastException when EJQLQuery parameters is null.
> -----------------------------------------------------
>
>                 Key: CAY-1514
>                 URL: https://issues.apache.org/jira/browse/CAY-1514
>             Project: Cayenne
>          Issue Type: Bug
>          Components: Core Library
>    Affects Versions: 3.0.1
>         Environment: Tomcat 6.0.26
>            Reporter: Marek Šabo
>         Attachments: cayST.txt
>
>
> When a parameter in EJBQLQuery is set to null, an error occurs which results in ClassCastException. When parameter is not null query is executed as expected.
> It is duplicable with following/similar code:
>         EJBQLQuery eq = new EJBQLQuery("SELECT COUNT(u) FROM User u WHERE u.username like :usernam AND u.userInfo.name like :userName");
>         eq.setParameter("userName", null);
>         eq.setParameter("usernam", "msabo");
>         return (Long) DataObjectUtils.objectForQuery(getObjectContext(), eq);
> Full stack trace is in attachment.

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