The Java Driver supports a query object of the following form:
HashMap<String, Object> operatorMap = new HashMap<String, Object>();
operatorMap.put("$in", asList(1, 2, 3));
BasicDBObject query = new BasicDBObject("a", operatorMap);
with a value that is a Map containing further expressions and operators.
It is important to me that this is supported since this behaviour is leveraged by morphia when creating queries.
This pull request extends ExpressionParser to allow this case and adds a test to demonstrate usage.
Allowing Map instances to be passed in query objects since this is pe…
…rmitted in the Java driver.