Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-14743

Off-by-one error in one-to-many document example

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • Server_Docs_20231030
    • Affects Version/s: None
    • Component/s: Server
    • Labels:
      None

      Per https://www.mongodb.com/community/forums/t/119902, the example on https://docs.mongodb.com/manual/tutorial/model-embedded-one-to-many-relationships-between-documents/ which represents "ten most recent reviews" includes an implied range of 11 IDs rather than 10:

      Then, in the code, there are 11 reviews (from review_id 786 to 776 inclusive)

      The tenth document _id should be 777

            Assignee:
            stephen.steneker@mongodb.com Stennie Steneker (Inactive)
            Reporter:
            stephen.steneker@mongodb.com Stennie Steneker (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              2 years, 36 weeks ago