Fix: aggregate not matching null values (#6043)
* Fix: aggregate not matching null values * Exclude Postgres from this new test - it does not even support and is not working correctly - should be addressed separately
This commit is contained in:
committed by
Diamond Lewis
parent
a754b883b2
commit
84776810b8
@@ -841,7 +841,9 @@ export class MongoStorageAdapter implements StorageAdapter {
|
||||
// As much as I hate recursion...this seemed like a good fit for it. We're essentially traversing
|
||||
// down a tree to find a "leaf node" and checking to see if it needs to be converted.
|
||||
_parseAggregateArgs(schema: any, pipeline: any): any {
|
||||
if (Array.isArray(pipeline)) {
|
||||
if (pipeline === null) {
|
||||
return null;
|
||||
} else if (Array.isArray(pipeline)) {
|
||||
return pipeline.map(value => this._parseAggregateArgs(schema, value));
|
||||
} else if (typeof pipeline === 'object') {
|
||||
const returnValue = {};
|
||||
|
||||
Reference in New Issue
Block a user