[
http://jira.jboss.com/jira/browse/JBSEAM-2987?page=comments#action_12414161 ]
Scott Olcott commented on JBSEAM-2987:
--------------------------------------
Is there anyway to get this into 2.0.2.SP1. I know I can work around it in a custom base
class, but since the method I need to override is private I have to override any method
that calls it also. I can provide a patch and a unit test if that would help, although
the fix isn't very hard.
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
Fix For: 2.1.0.BETA1
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