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
Parse aggregation pipeline is throwing error on multiple group by. If the first group stage is based on a pointer field and second group stage is based on the number field then it is throwing error.
Uncaught internal server error.result._id.split is not a function on line /node_modules/parse-server/lib/Adapters/Storage/Mongo/MongoStorageAdapter.js:596:15
On the second group stage, result._id is a number but storage adapter is trying to split it. And the reason it is trying to split it because isPointerField is being set as true due to the first group stage.
The text was updated successfully, but these errors were encountered:
Issue Description
Parse aggregation pipeline is throwing error on multiple group by. If the first group stage is based on a pointer field and second group stage is based on the number field then it is throwing error.
Steps to reproduce
var pipeline = [ { group: { objectId: '$user', totalScore: { $sum: '$score' } } }, { group: { objectId: '$totalScore', users: { $push: { userId: "$_id" } } } }, { sort: {objectId: -1}} ];
Expected Results
[ { "users": [ { "userId": "_User$odInwXlX1B" } ], "objectId": 50 }, { "users": [ { "userId": "_User$bnhHc22tfl" } ], "objectId": 10 } ]
Actual Outcome
Uncaught internal server error.result._id.split is not a function on line /node_modules/parse-server/lib/Adapters/Storage/Mongo/MongoStorageAdapter.js:596:15
Environment Setup
Server
Database
My Observation
On the second group stage, result._id is a number but storage adapter is trying to split it. And the reason it is trying to split it because isPointerField is being set as true due to the first group stage.
The text was updated successfully, but these errors were encountered: