-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
"Undefined index: result" - When calling Model aggregation methods #44
Comments
Okay -- digging into this more, it turns out that the aggregate function in MongoDB is new as of version 2.2 (of the mongod service). So if you're using this package, you'll want make sure you're using the latest version of the service. @jenssegers --> Might be good to add this to the documentation ;) If you're on ubuntu, like I am, you need to install from the 10Gen aptitude repo, as the default one (just using apt-get install mongodb) will give you a quite older version, 2.0.4 in my case. http://docs.mongodb.org/manual/reference/method/db.collection.aggregate/ |
When I try to call any of the Model's aggregate functions (static calls to count, min, max, sum ...) I get this error message from the Builder.
In this example I have a simple class called Characters extending your base model, and its empty (no specialization code). Here is the logged output of the results array from the call to collection->aggregate()
The text was updated successfully, but these errors were encountered: