[SERVER-2035] add an option to disable the dot notation when updating an object Created: 30/Oct/10  Updated: 17/Mar/11  Resolved: 30/Oct/10

Status: Closed
Project: Core Server
Component/s: Querying
Affects Version/s: 1.7.2
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: David Cuadrado Assignee: Unassigned
Resolution: Done Votes: 2
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:

 Description   

it would be nice to disable the dot notation in some cases, for example in my system I have tags that have dots in the name and I can't increment the count.
also, mappers like mongoid use the atomic updates to save the new changes althought they use explicit object names (they don't use the dot notation I think)

see this case for example: (althought there are more cases)

http://github.com/mongoid/mongoid/issuesearch?state=open&q=dot#issue/290



 Comments   
Comment by David Cuadrado [ 30/Oct/10 ]

you're right Eliot, after upgrading the ruby driver it doesn't allow me to create that kind of objects anymore. thanks your help

Comment by Eliot Horowitz (Inactive) [ 30/Oct/10 ]

How did you insert that?
Its a bug that you were allowed to create that object.

Comment by David Cuadrado [ 30/Oct/10 ]

Eliot, mongodb allows me to create keys with dots so I think it should at least let me update them, for example an structure like this is allowed :

{key1: {key2:

{key.3: 1}

}}

however I can't perform atomic updates on it, doesn't make sense to me.

Comment by Eliot Horowitz (Inactive) [ 30/Oct/10 ]

dots are not allowed in key names for many reasons, including not being able to reach into objects, index, etc...

in general people replace . with another character

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