Beginner |
|
Joined: Thu Feb 03, 2005 10:42 pm Posts: 30
|
I do not understand the use of the elements hsql key word. I am trying to form a query that compares to sets of data to see if there is a match:
I have a person which has groups and I have a user which has groups. The groups can either be active or inactive. I am trying to query for all persons that has any matching group from my user entity.
So one try:
from Person person where elemetns(from person.groups where person.groups.active = true) in elements(?)
then i set the parameter to user.getGroups()
That don't work. I have tried a million other variations, but honestly I am confused as to the best way to structure this query. Help appreciated. Essentially the idea is that i have the user object already and need a whole bunch of persons that have an intersection of the groups collection.
|
|