-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Criteria query and Cartesian Product
PostPosted: Thu Jun 16, 2005 9:03 pm 
Newbie

Joined: Thu Jun 16, 2005 8:02 pm
Posts: 1
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.