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

field name with dot contradiction

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major - P3 Major - P3
    • None
    • 1.6.3
    • Write Ops
    • None
    • ubuntu 10.04, Mac OSX
    • ALL

    Description

      I tried the following code in mongo-shell, but it seems contradiction :

      > db.doc.drop()
      > db.doc.save({ versions :

      { '1.1' : 0 }

      })
      Sat Oct 30 19:00:39 uncaught exception: can't have . in field names [1.1]

      > db.doc.save({})
      > doc = db.doc.findOne()
      > db.doc.update({_id : doc['_id'] }, { versions :

      { '1.1' : 0 }

      } )
      > db.doc.findOne()
      {
      "_id" : ObjectId("4ccbfb31fe8d276c4eb1b846"),
      "versions" :

      { "1.1" : 0 }

      }

      If mongo does not allow field names that have dot, then I should not allow to save in any way.

      Attachments

        Activity

          People

            antoine Antoine Girbal
            stonegao Stone, Gao
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: