mirror of
https://github.com/mongodb/mongo.git
synced 2024-12-01 09:32:32 +01:00
check matching regexes encapsulated directly in arrays as well
This commit is contained in:
parent
e7bc0e56d0
commit
17167cade8
@ -779,7 +779,7 @@ namespace mongo {
|
||||
BSONElement f = i.next();
|
||||
if ( f.eoo() )
|
||||
break;
|
||||
ret.insert( e );
|
||||
ret.insert( f );
|
||||
}
|
||||
} else {
|
||||
ret.insert( e );
|
||||
|
@ -11,6 +11,14 @@ t.drop();
|
||||
t.save( { a: { b: "cde" } } );
|
||||
assert.eq( 1, t.count( { 'a.b': /de/ } ) );
|
||||
|
||||
t.drop();
|
||||
t.save( { a: { b: [ "cde" ] } } );
|
||||
assert.eq( 1, t.count( { 'a.b': /de/ } ) );
|
||||
|
||||
t.drop();
|
||||
t.save( { a: [ { b: "cde" } ] } );
|
||||
assert.eq( 1, t.count( { 'a.b': /de/ } ) );
|
||||
|
||||
t.drop();
|
||||
t.save( { a: [ { b: [ "cde" ] } ] } );
|
||||
assert.eq( 1, t.count( { 'a.b': /de/ } ) );
|
||||
|
Loading…
Reference in New Issue
Block a user