-
Type: Improvement
-
Resolution: Won't Fix
-
Priority: Major - P3
-
None
-
Affects Version/s: 1.7.1
-
Component/s: Querying
-
Labels:None
If you have nested counters in a document you have always specify the full path to update them.
update(
{id:1}, {
'some.path.into1' : 1,
'some.path.into2' : 1,
})
this quickly becomes quite verbose. Using a document for this would feel natural.
update(
{id:1}, { '$inc': { 'some' : { 'path' :
{ 'into1' : 1, 'into2' : 1, }}}})
the increment would be on all leaf nodes that are of type int