I am using the following software and their versions:
- mongodb: 3.4.10
- spring-data-mongodb: 2.10.1.RELEASE
- mongodb java driver: 3.4.3
- spring boot: 1.5.10.RELEASE
MongoDB schema:
{
"_id" : ObjectId("some id"),
"a":{/* Complex Structure */},
"b": [/* Array of transaction records */],
"c": {/* Some additional 50 fields with mixture of various data types */ }
}
Java code: TransactionMap class is a java.util.HashMap
mongoTemplate.updateFirst(query, update, TransactionMap.class);
Exception traced:
java.lang.IllegalArgumentException: Replacements can not be multi
When will the above exception be thrown?