[hibernate-issues] [Hibernate-JIRA] Created: (HHH-5799) QuerySyntaxException on criteria query with isMember()

Harald Wellmann (JIRA) noreply at atlassian.com
Thu Dec 16 10:49:13 EST 2010


QuerySyntaxException on criteria query with isMember()
------------------------------------------------------

                 Key: HHH-5799
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5799
             Project: Hibernate Core
          Issue Type: Bug
          Components: query-criteria
    Affects Versions: 3.6.0
            Reporter: Harald Wellmann


This appears to be the criteria equivalent of the JPQL bug reported in HHH-5209:

For a JPQL query of the type

{code}
select user from User user where :role member of user.roles
{code}

the analogous Criteria query has the form

{code}
CriteriaBuilder cb. em.getCriteriaBuilder();
CriteriaQuery<User> cq = cb.createQuery(User.class);
Root<User> user = cq.from(User.class);
cq.select(user).where(cb.isMember(role, user.<Set<String>>.get("roles")));
{code}
 
When running the criteria query, Hibernate throws a QuerySyntaxException with the message "unexpected end of subtree".

-- 
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