UpdateBatch
Updating fields of documents.
// Remove the field "postalCode"
boolean success = repository.updateAllFields(UpdateBatch.of(FieldUpdate.remove("postalCode")));
// Rename the field "balance" to "balanceRenamed"
boolean success = repository.updateAllFields(UpdateBatch.of(FieldUpdate.rename("balance", "balanceRenamed"));
// Hard-Set the value of the field "postalCode" to 987654321
boolean success = repository.updateAllFields(UpdateBatch.of(FieldUpdate.set("postalCode", 987654321)));boolean success = repository.updateAllFields(UpdateBatch.of(
FieldUpdate.remove("postalCode"),
FieldUpdate.rename("balance", "balanceRenamed"),
FieldUpdate.set("postalCode", 987654321)
));
Last updated