Originally posted by Edvins Reisons:
Why not Show Some Effort first? The Hibernate Reference has a chapter on the Criteria interface.
Okay sorry, in deed I looked at the docs but find it hard to solve my problem, which seems to be somehow more special.
The first attempt I would take was this, but I assume this will not work:
The first line should give me all users, the second line shall restrict the roles (roleone AND roletwo at the same time), the next line should then restrict the groups in the same way.
1) I don't know if the INNER_JOIN would be right.
2) Is adding two Restrictions equal to "apply Restriction one AND two"?
3) I read about setting a result transformer is necessary to get correct results. Hope this is the right one, but will try others when the lines before are okay.
I understood quite all of the basic examples of the Hibernate tutorial. But for my current problem it seems hard to find a solution for.
Thanks in advance.