Uploaded image for project: 'MongoDB Shell'
  1. MongoDB Shell
  2. MONGOSH-1195

Remove removed `collection.save()` command instead of showing as deprecated

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 1.4.1
    • Affects Version/s: None
    • Component/s: Shell API
    • None
    • 2
    • Iteration Zanzibar
    • Not Needed

      Currently the collection `.save()` command errors with a `MongoshInvalidInputError` error. As this command has been removed in the driver as of 4.0 we should be able to drop it entirely. Currently we are printing a message with the error that states the command is deprecated. If we don't remove it we should at least update the message to be explicit that the command has been removed.

      Driver 4.0 Changes where `.save()` was removed:
      https://github.com/mongodb/node-mongodb-native/blob/4.0/docs/CHANGES_4.0.0.md#removed-deprecations

      Where we updated to the node driver 4.0 and removed the .save() support (in collection.ts): https://github.com/mongodb-js/mongosh/pull/451/files#diff-c975be9c4e061c8d6cf6aac2dd4da42c6096bdf5e8e62601eca89f85e22302c3R760

      Slack thread https://mongodb.slack.com/archives/CUHC9R8J0/p1650393933560119

            Assignee:
            rhys.howell@mongodb.com Rhys Howell
            Reporter:
            rhys.howell@mongodb.com Rhys Howell
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: