Skip to content
This repository has been archived by the owner on Aug 12, 2022. It is now read-only.

Aggregate function is broken #27

Open
andrewsumskoy opened this issue Jul 16, 2015 · 6 comments
Open

Aggregate function is broken #27

andrewsumskoy opened this issue Jul 16, 2015 · 6 comments

Comments

@andrewsumskoy
Copy link

MongoError: exception: pipeline element 0 is not an object
but callback is work now

@gordonmleigh
Copy link
Owner

Thanks for the report. Can you show me a minimal code example that produces this error?

@sjmeverett
Copy link
Collaborator

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
#27 (comment)
.

@yangchristian
Copy link

👍 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/

@cfreman
Copy link

cfreman commented Nov 12, 2015

Is there any fix or workaround for this?

@yangchristian
Copy link

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: #41

@cfreman
Copy link

cfreman commented Nov 12, 2015

@yangchristian thank you. I had seen the PR but not the new fork. Great job!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants