Add support for ObjectId in aggregations
This commit is contained in:
parent
48d84d67bf
commit
98871064a9
|
@ -564,14 +564,14 @@ class MongoIntegration implements IntegrationBase {
|
|||
query.steps.map(({ key, value }) => {
|
||||
let temp: any = {}
|
||||
temp[key] = JSON.parse(value.value)
|
||||
return temp
|
||||
return this.createObjectIds(temp)
|
||||
})
|
||||
)) {
|
||||
response.push(doc)
|
||||
}
|
||||
} else {
|
||||
const stages: Array<any> = query.json as Array<any>
|
||||
for await (const doc of collection.aggregate(stages ? stages : [])) {
|
||||
for await (const doc of collection.aggregate(stages ? this.createObjectIds(stages) : [])) {
|
||||
response.push(doc)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue