DeleteOne does not return any useful information when no document exists

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Works as Designed
    • Priority: Major - P3
    • None
    • Affects Version/s: 1.2.0
    • Component/s: None
    • None
    • Environment:
      Mac OS Catalina
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      `DeleteOne` method on the collection returns a value of type `*mongo.DeleteResult` which has one attribute `DeletedCount` whose value can either be 0 or 1. It would have been better if there was some way of indicating error when no document was found to be deleted instead of manually checking the `DeletedCount` attribute.

      `DeletedCount` doesn't seem very useful for testing purposes.

            Assignee:
            Jeffrey Yemin
            Reporter:
            Deepak Sah
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: