Hello, David
You will be able to get through with your issues with HQL. In case you didn't use, it is quite straightforward and I find it easier than SQL.
(1) Yes, you can have a set. Just make sure you have reverse="true". Another option is this simple query: "from User u where :role in u.roles". You can get further info from
Hibernate HQL documentation.
I think you get the way I'm going, right? You cannot use a set for (2), but HQL will certainly do the trick for you. Just add a clause to the query and you have what you need.
I would just like to finish making it clear that this may not be
the best way to do this; but it certainly is
one way. Best regards
[ February 07, 2006: Message edited by: Henrique Sousa ]