Therefore I suggest to link the array and test object with an else if statement so object is not processed if the key has already been recognized as an Array.
Coverage increased (+1.4%) to 95.413% when pulling de578156a77229c8a1c985578eb9f32076b32968 on SirbyAlive:features/query_exclude_array_issue into e6f05e7768bf6510da35ed635fd4a7c1b4b45602 on vdemedes:master.
When we give an array of fields to exclude to Query, we receive a MongoError:
Indeed the key is first recognized as an
Array
, then anObject
resulting in the query fields being set to:Therefore I suggest to link the array and test object with an
else if
statement so object is not processed if the key has already been recognized as an Array.