Mongodb: And filter on same property broken

Description

The And filter builder had this comment 'Expressions like ((A == 1) AND (B == 2)) are basically implied. So just build up all sub expressions'.
Which is true for an AND expressions with 2 different properties, however for an AND on the same property '((A > 1) AND (A <= 2))'
this expression will overwrite the first expression with the second since the key is the same.
IE { "A" : { "$lte" : 2 } }, rather than the correct expression { "$and" : [{ "A" : { "$gt" : "0" } }, { "A" : { "$lt" : "10" } }] }

Environment

using gt-mongodb data module

Status

Assignee

Unassigned

Reporter

Billy Newman

Triage

None

Components

Affects versions

16.2

Priority

Medium
Configure