I have a query that filters the data that certain user has access to. I use HQL to execute that query, but I'm interested in using Criteria API. The problem is that I can't figure out how to express that using Criteria Query because I need to execute a cartesian product between the data I want and the user entity.
I would like to express the following HQL query using Criteria API:
select client from Client as client inner join client.group as group, User as user where user.login=? and ( group in elements( user.groups) )
The attribute user.groups represents the groups that certain user has access to.
Other associations are described in the HQL.
Thanks
_________________ felipenoris
|