[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-2987) HibernateEntityQuery fails when using a Collection as a parameter in an restriction

Scott Olcott (JIRA) jira-events at lists.jboss.org
Mon May 12 21:02:21 EDT 2008


HibernateEntityQuery fails when using a Collection as a parameter in an restriction
-----------------------------------------------------------------------------------

                 Key: JBSEAM-2987
                 URL: http://jira.jboss.com/jira/browse/JBSEAM-2987
             Project: Seam
          Issue Type: Bug
          Components: Framework
    Affects Versions: 2.1.0.A1, 2.0.2.CR2
         Environment: hibernate/tomcat
            Reporter: Scott Olcott


HibernateEntityQuery fails when using a Collection object as a parameter in an restriction.

The private setParameters method in HibernateEntityQuery does not check to see if the parameter is a Collection before calling query.setParameter(name,value).  In plain hibernate it needs to call the query.setParameterList method instead of the setParameter method.  When passing a List as a parameter to a restriction a ClassCastException is thrown.

This is not an issue when using EntityQuery, because in JPA the setParameter method on org.hibernate.ejb.QueryImpl takes care of this for you.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the seam-issues mailing list