I'm trying to create a dynamic mongodb query using spring criteria. My
query is : Criteria.where(key1).is(value1 .and(key2).is(value2)
If I use it the query works but if I try:
It doesn't works. I would want to use the second solutions because the
number of keys and values aren't fixed.
Can someone tell me what's the difference beetween these solutions or where
is the error?
I'll try to create manually the query but it doesn't work:
BasicDBList andList = new BasicDBList();
BasicDBObject queryObject = new BasicDBObject("$and", andList);
Can someone hel me to find errors?
Thanks too much.