Thanks, Stephen. For now I've broken it up into two queries: - SELECT groups for a given user. - build an int[] array containing the group IDs - use the Criteria.addIn(String column, int[] ids) to constrain on the proper groups, then SELECT users
It seems to work fine; I was hoping to try and use the Criterion object since the Peer and Criteria howtos seem to indicate this is possible. But it'll have to wait until after the deadline! :) Derek At 03:50 PM 9/27/2002, you wrote: > > Anyone got any further insight into this? > >Criterion might do the trick, though I haven't work with those yet, so >it's just a guess. > >A straight criteria won't work because you limit the user table on a >given id, but then after joining with the group, want to come back and >more users than match the given id. > >So you'll probably have to break it up into multiple queries. E.g. first >get all of the user's groups, then get do another query for anyone who >is in any of those groups (OR together each group returned by the first >query into the second query). > >- Stephen > > >-- >To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> >For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
