summaryrefslogtreecommitdiff
path: root/jstests/update6.js
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2009-07-23 11:32:41 -0400
committerEliot Horowitz <eliot@10gen.com>2009-07-23 11:32:41 -0400
commite358971d6f7d57d77f1ce5b0a1b7849ae3ba93f1 (patch)
treeff6f1e89491aedded196291e64dffb84b489b0bd /jstests/update6.js
parentdba7572265b657bde920bd69f943cb80eb8a7c58 (diff)
downloadmongo-e358971d6f7d57d77f1ce5b0a1b7849ae3ba93f1.tar.gz
fix $inc and other mods with embedded fields SERVER-180
Diffstat (limited to 'jstests/update6.js')
-rw-r--r--jstests/update6.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/jstests/update6.js b/jstests/update6.js
index 174fd91fe86..ed8eaded508 100644
--- a/jstests/update6.js
+++ b/jstests/update6.js
@@ -34,11 +34,13 @@ t.drop();
t.save( {"_id" : 2 ,
"b3" : {"0720" : 5 , "0721" : 12 , "0722" : 11 , "0723" : 3 , "0721" : 12} ,
- "b323" : {"0720" : 1} ,
+ "b324" : {"0720" : 1} ,
}
);
assert.eq( 4 , t.find({_id:2},{b3:1})[0].b3.keySet().length , "test 2 : ks before" );
-t.update({_id:2},{$inc: { 'b3.0719' : 1}},true)
-//assert.eq( 5 , t.find({_id:2},{b3:1})[0].b3.keySet().length , "test 2 : ks after" );
+printjson( t.find({_id:2},{b3:1})[0].b3 )
+t.update({_id:2},{$inc: { 'b3.0719' : 1}} )
+printjson( t.find({_id:2},{b3:1})[0].b3 )
+assert.eq( 5 , t.find({_id:2},{b3:1})[0].b3.keySet().length , "test 2 : ks after" );