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

Gail Badner (JIRA) noreply at atlassian.com
Mon Jan 10 11:55:05 EST 2011


     [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-5799?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gail Badner updated HHH-5799:
-----------------------------

    Fix Version/s: 4.0.0.Alpha1
                   3.6.1

> 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
>             Fix For: 3.6.1, 4.0.0.Alpha1
>
>
> 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