Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-23281

Silent failure when inserting mongo object with an object field as the _id

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • ALL

      I accidentally inserted documents in the database with an object as the _id field. I noticed this person reported a similar problem a few years ago: http://stackoverflow.com/questions/24618380/mongodb-inserts-silently-fail

      If I try to do a find all query {}, I can't find the object inserted, but no error was returned. I'm on Mongo 3.0.

      When an index sees a non-object-id object in the indexed field, does it just skip over it rather than erroring? Even if this was the case, I'd expect to find the object when searching with an empty query.

            Assignee:
            Unassigned Unassigned
            Reporter:
            fresheneesz Billy Tetrud
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: