kochcp wrote:
well, you can either do it in memory, or do it on the database side. for the database side just use regular hql or sql. That whole b.users.containsAll(a.users) thing is most likely not be supported.
Code:
select users where <attributes that match A> and <attributes that match B>
to do it in memory, just load up both the sets and run a little loop.
Thank, I can do it, but it is not good solution for me because the database will
contain thousands of instances of both classes. Can you explain how to do it on the database side, please ?
My goal is not to select users but instances of class 'A' .