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

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

    XMLWordPrintable

Details

    • Task
    • Status: Closed
    • Minor - P4
    • Resolution: Fixed
    • None
    • None
    • Server
    • None
    • true

    Description

      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

      Attachments

        Activity

          People

            stephen.steneker@mongodb.com Stennie Steneker
            stephen.steneker@mongodb.com Stennie Steneker
            Jeffrey Allen Jeffrey Allen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              1 year, 6 weeks, 6 days ago