diff options
author | Antonin Kral <a.kral@bobek.cz> | 2011-03-17 00:07:52 +0100 |
---|---|---|
committer | Antonin Kral <a.kral@bobek.cz> | 2011-03-17 00:07:52 +0100 |
commit | 98b8b639326ab4c89eed73739d9903993c4c8959 (patch) | |
tree | 0462df078bf740093774d033b75f0ea24a31fa97 /jstests/exists.js | |
parent | f5d6e97ca8d2f3e7c4cdd5c9afbf8e756ef65bc2 (diff) | |
parent | 582fc32574a3b158c81e49cb00e6ae59205e66ba (diff) | |
download | mongodb-98b8b639326ab4c89eed73739d9903993c4c8959.tar.gz |
Merge commit 'upstream/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(); |