You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to find() a property that is nested in an array of arrays, the record is not returned if the child array has more than one element and one or more of those elements match.
Repro steps:
// no regex - returns expected list: 1 element - ok
mingo.find([{l1: [{ tags: ['tag1', 'tag2'] }, {'notags': 'yep'}]}], {'l1.tags': 'tag1'}).all()
// with regex - but searched property is not an array: ok
mingo.find([{l1: [{ tags: 'tag1'}, {'notags': 'yep'}]}], {'l1.tags': {$regex: '.*tag.*', $options: 'i'}}).all()
// with regex - but searched property is an array, with all elements matching: not ok - expected 1, returned 0
mingo.find([{l1: [{ tags: ['tag1', 'tag2'] }, {'tags': ['tag66']}]}], {'l1.tags': {$regex: 'tag', $options: 'i'}}).all();
// with regex - but searched property is an array, only one element matching: not ok - returns 0 elements - expected 1
mingo.find([{l1: [{ tags: ['tag1', 'tag2'] }, {'notags': 'yep'}]}], {'l1.tags': {$regex: 'tag', $options: 'i'}}).all();
//
The text was updated successfully, but these errors were encountered:
When trying to
find()
a property that is nested in an array of arrays, the record is not returned if the child array has more than one element and one or more of those elements match.Repro steps:
The text was updated successfully, but these errors were encountered: