diff options
author | Antonin Kral <a.kral@bobek.cz> | 2011-03-17 00:05:43 +0100 |
---|---|---|
committer | Antonin Kral <a.kral@bobek.cz> | 2011-03-17 00:05:43 +0100 |
commit | 582fc32574a3b158c81e49cb00e6ae59205e66ba (patch) | |
tree | ac64a3243e0d2121709f685695247052858115c8 /jstests/exists.js | |
parent | 2761bffa96595ac1698d86bbc2e95ebb0d4d6e93 (diff) | |
download | mongodb-582fc32574a3b158c81e49cb00e6ae59205e66ba.tar.gz |
Imported Upstream version 1.8.0
Diffstat (limited to 'jstests/exists.js')
-rw-r--r-- | jstests/exists.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/jstests/exists.js b/jstests/exists.js index 28f69e8..3f1e904 100644 --- a/jstests/exists.js +++ b/jstests/exists.js @@ -25,7 +25,7 @@ function dotest( n ){ assert.eq( 3, t.count( {'a.b': {$exists:true}} ) , n ); assert.eq( 2, t.count( {'a.b.c': {$exists:true}} ) , n ); assert.eq( 1, t.count( {'a.b.c.d': {$exists:true}} ) , n ); - + assert.eq( 1, t.count( {a: {$exists:false}} ) , n ); assert.eq( 2, t.count( {'a.b': {$exists:false}} ) , n ); assert.eq( 3, t.count( {'a.b.c': {$exists:false}} ) , n ); @@ -38,6 +38,7 @@ t.ensureIndex( { "a.b" : 1 } ) t.ensureIndex( { "a.b.c" : 1 } ) t.ensureIndex( { "a.b.c.d" : 1 } ) dotest( "after index" ) +assert.eq( 1, t.find( {a: {$exists:false}} ).hint( {a:1} ).itcount() ); t.drop(); |