Joined: Fri Sep 19, 2003 2:57 pm Posts: 10
|
I have to classes:
user with usrId as a key. Table users
userGroup with usgId as a key. Table user_groups
I have a many-to-many relationship between them using other table user_group_details with both keys.
I want to make a query to select the userGroups with the id of the user.
I have this:
select elements(user.userGroups)
from com.miradores.vmon.data.UserGroup as usergroup
,com.miradores.vmon.data.User as user
where 1=1
and usergroup in elements(user.userGroups)
and user.usrId = 1
But doesn't work!
How must be the query?
Thanks
|
|