tenwit wrote:
The logic there looks odd. You want to get all ClientIds where the caisiId is as speicfied, and the groupId is the same as any other ClientId? Or maybe you want all ClientIds which share a groupId with any ClientId with the given caisiId? Or is it that you want all ClientIds which have the given caisiId, so long as there's another ClientId with the same caisiId and groupId?
Either way, you want joins, not "FROM ClientId ci, ClientId ci2". That syntax is what's creating the list with two elements. Whatever about the rest of the query, the FROM should only have a single ClientId if all you want returned is a list of ClientIds.
ya, it's pretty messed up :)
I want to get all ClientId objects that share a common groupId and one of them has the caisiId = ?