I have entities A and B, and A can have set of B. The same instance of B can belong to several A. So there is classical many-to-many relation here.
In GAE there is no di
If you refactor your relationship mapping you can get a better query. Instead of storing a set of keys in A, store a set of keys in B. Then you can query with
select * from B where a_id = {idOfRelevantA} and property0 = {criterion0} and property1 = {criterion1}...
This way you avoid the multiple queries that the in
operator creates.
Also, beware: in
will only work for a list of 30 elements or fewer.