org.springframework.data.mongodb.InvalidMongoDbApiUsageException: Due to limitations of the com.mongodb.BasicDBObject, you can't add a second '$or' expression specified as '$or : [ { “field1” : “value1”}, {“field1” : “value2”}]'. Criteria already contains '$or : [ { “field2” : “value3”} , { “field2” : “value4”}]'.

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

    • org.springframework.data.mongodb.InvalidMongoDbApiUsageException: Due to limitations of the com.mongodb.BasicDBObject, you can't add a second '$or' expression specified as '$or : [ { “field1” : “value1”}, {“field1” : “value2”}]'. Criteria already contains '$or : [ { “field2” : “value3”} , { “field2” : “value4”}]'. at org.springframework.data.mongodb.core.query.Criteria.setValue(Criteria.java:640) at org.springframework.data.mongodb.core.query.Criteria.getCriteriaObject(Criteria.java:573) at org.springframework.data.mongodb.core.query.Criteria.createCriteriaList(Criteria.java:630) at org.springframework.data.mongodb.core.query.Criteria.andOperator(Criteria.java:539)
    No Bugmate found.