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

findOneAndUpdate does not handle an empty update document properly

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.0.0
    • Component/s: Write Operations
    • Labels:
      None
    • Backwards Compatibility:
      Minor Change

      Description

      The CRUD specification requires that an update contains at least one
      field, in order to check for application bugs. `updateOne` throws an exception when given an empty update document. `findOneAndUpdate` treats the empty update document as a no-op. The empty update document check for `findOneAndUpdate` must be updated in the same manner as the fix for JAVA-3328.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              john.stewart John Stewart (Inactive)
              Reporter:
              john.stewart John Stewart (Inactive)
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: