Home > database >  MongoTemplate upsert update failure
MongoTemplate upsert update failure

Time:10-12


Respectively using the following three methods to experimental update operations.
When confirm to update the field is in the update, for regular updates.
When the update is null or does not exist to update the field, the original document in the database will only retain a _id field, the original documents of the other fields disappeared.
What is going on.

 
MongoTemplate. Upsert (query, update, "clean_new_register");
MongoTemplate. UpdateMulti (query, update, "clean_new_register");
MongoTemplate. UpdateFirst (query, update, "clean_new_register");
  • Related