[SERVER-2043] field name with dot contradiction Created: 01/Nov/10  Updated: 07/Mar/14  Resolved: 14/Dec/10

Status: Closed
Project: Core Server
Component/s: Write Ops
Affects Version/s: 1.6.3
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Stone, Gao Assignee: Antoine Girbal
Resolution: Duplicate Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

ubuntu 10.04, Mac OSX


Operating System: ALL
Participants:

 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.



 Comments   
Comment by Antoine Girbal [ 13/Dec/10 ]

duplicate of SERVER-1988

Generated at Thu Feb 08 02:58:48 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.