-
Type:
Bug
-
Resolution: Duplicate
-
Priority:
Major - P3
-
None
-
Affects Version/s: 1.6.3
-
Component/s: Write Ops
-
None
-
Environment:ubuntu 10.04, Mac OSX
-
ALL
-
None
-
3
-
None
-
None
-
None
-
None
-
None
-
None
I tried the following code in mongo-shell, but it seems contradiction :
> db.doc.drop()
> db.doc.save({ versions :
})
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 :
} )
> db.doc.findOne()
{
"_id" : ObjectId("4ccbfb31fe8d276c4eb1b846"),
"versions" :
}
If mongo does not allow field names that have dot, then I should not allow to save in any way.