[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-5126) JPA Query with InExpression and Collection_valued_input_parameter Complains About Bad Syntax
Pierce Wetter (JIRA)
noreply at atlassian.com
Thu Apr 29 21:27:28 EDT 2010
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-5126?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=36801#action_36801 ]
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.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list