Joined: Wed Mar 17, 2004 6:30 pm Posts: 1
|
I have these two classes defined in hibernate
User{
String username;
List groups;
}
Group{
group_id;
}
"select elements(users.groups) from User as users" works fine, but what I'm trying to do is trying to get all the users in the same group as a certain user. How would i do something like that in HQL. My best guess so far has been "from User as users1 where elements(users1.groups) in (select elements(users.groups) from User as users)". But this doesn't work.
Any help would be greatly apreciated.
regards
Michael
|
|