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

Timeseries collections allow _id document with dollar-prefixed field name

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Execution
    • ALL

      If 'test' is not a timeseries collection, the insertion fails.

      db.test.drop();
      db.createCollection("test", {timeseries: {timeField: "timestamp", metaField: "metadata"}});
      db.test.insert({_id: 1, timestamp: ISODate("2000-01-01T00:00:00.000Z")})
      db.test.insert({_id: {$eq: 1}, timestamp: ISODate("2000-01-01T00:00:00.000Z")})
      db.test.find({_id: 1});
      db.test.find({_id: {$eq: 1}});
      db.test.find({_id: {$eq: {$eq: 1}}}); 

      Timeseries collections don't enforce that _id fields exist in the first place, so this is perhaps not an especially high priority issue.

            Assignee:
            Unassigned Unassigned
            Reporter:
            evan.bergeron@mongodb.com Evan Bergeron
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: