Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-2491

Clarify "upserted items" in javadoc for BulkWriteResult.getUpserts()

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Minor - P4 Minor - P4
    • None
    • None
    • Documentation
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?

    Description

      The javadoc for BulkWriteResult.getUpserts() says
      > Gets an unmodifiable list of *upserted* items, or the empty list if there were none.

      Arguably, "upserted items" is a bit ambiguous as a user might expect that to be populated when there's an update. The mongo shell documentation for https://docs.mongodb.com/manual/reference/method/BulkWriteResult/#BulkWriteResult.upserted is a little more specific, as it states:
      > An array of documents that contains information for each document *inserted* through operations with the Bulk.find.upsert() option.

      Attachments

        Activity

          People

            Unassigned Unassigned
            mark.helmstetter@mongodb.com Mark Helmstetter
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated: