You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by GitBox <gi...@apache.org> on 2021/10/26 23:53:35 UTC

[GitHub] [nifi] illion20 commented on pull request #5482: NIFI-9334 Add support for upsert in 'PutMongoRecord'.

illion20 commented on pull request #5482:
URL: https://github.com/apache/nifi/pull/5482#issuecomment-952418705


   Suggestion:
   
   Add a multi boolean and support UpdateManyModel
   ```java
   if(multi){
       writeModel = new UpdateManyModel<>(
           Filters.and(filters),
           new Document("$set", readyToUpsert),
           new UpdateOptions().upsert(true)
       );
   } else {
       writeModel = new UpdateOneModel<>(
           Filters.and(filters),
           new Document("$set", readyToUpsert),
           new UpdateOptions().upsert(true)
       );
   }
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org