Updates.setOnInsert just accepts (String, TItem) as arguments. I think it would be developer friendlier to accept a Document, too.
Add Updates.setOnInsert(Bson Items) as well for multiple fields that need to be set on insert.
Updates.setOnInsert just accepts (String, TItem) as arguments. I think it would be developer friendlier to accept a Document, too.
Add Updates.setOnInsert(Bson Items) as well for multiple fields that need to be set on insert.