[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-5126?page=c...
]
Pierce Wetter commented on HHH-5126:
------------------------------------
Also, the parenthese should be allowed, then it should expect single values.
Query qTwoLogins = em.createQuery(
"select u from User u where ou.loginId in (:login1, :login2)"
);
Query qCollectionLogins = em.createQuery(
"select u from User u where u.login in :logins"
);
qTwoLogins.setParameter("login1","testuser1");
qTwoLogins.setParameter("login2","testuser2");
HashSet<String> list= new HashSet<String>(2);
list.add("testuser1");
list.add("testuser2");
qCollectionLogins.setParameter("logins",list);
BTW, could we fix this soon, its driving me crazy everytime I switch between EclipseLink
and Hibernate to try to shake out bugs I have in Hibernate but not EclipseLink.
JPA Query with InExpression and Collection_valued_input_parameter
Complains About Bad Syntax
--------------------------------------------------------------------------------------------
Key: HHH-5126
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-5126
Project: Hibernate Core
Issue Type: Bug
Affects Versions: 3.5.1
Reporter: Guido Müller
Priority: Blocker
JPA 2.0 spec final chapter 4.6.9 In Expressions
In the spec there are 3 alternatives allowed for the query argument. For the 3rd
alternative there are no parenthesis allowed.
Hibernate seems to expect these illegal parenthesis.
The error occurs within a named query in an entity class.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira