Open andrewsumskoy opened 9 years ago
Thanks for the report. Can you show me a minimal code example that produces this error?
This is because aggregate has changed: the old version of promised-mongo took an array into aggregate, but the new version expects the pipeline stages as an argument list. We'll probably need to chuck something into the compatibility function for it.
On 16 July 2015 at 13:45, Gordon Mackenzie-Leigh notifications@github.com wrote:
Thanks for the report. Can you show me a minimal code example that produces this error?
— Reply to this email directly or view it on GitHub https://github.com/gordonmleigh/promised-mongo/issues/27#issuecomment-121946795 .
:+1: Just ran into this today. Our app code unfortunately broke upon updating from v0.11.6 since we use aggregate
with the array format for the pipeline
param. I believe that is still the official Mongo API: http://docs.mongodb.org/manual/reference/method/db.collection.aggregate/
Is there any fix or workaround for this?
My team implemented a fix in our fork (+ some other fixes) here: https://github.com/CrossLead/promised-mongo/tree/crosslead-release
We also submitted an outstanding PR with just this fix: https://github.com/gordonmleigh/promised-mongo/pull/41
@yangchristian thank you. I had seen the PR but not the new fork. Great job!
MongoError: exception: pipeline element 0 is not an object
but callback is work now