Implement partial support for updateOrInsert.