Since db.eval is being deprecated, I would recommend against using it.
Is there a reason you're trying to use this via function rather than just making a regular query?
Asya
--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.
For other MongoDB technical support options, see: http://www.mongodb.org/about/support/.
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user...@googlegroups.com.
To post to this group, send email to mongod...@googlegroups.com.
Visit this group at http://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/e263549d-b45c-4276-a21d-967fc6f3a313%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I wouldn't recommend storing aggregations in the server system.js - i would just treat it like the rest of your code and keep it there.
Asya
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/d070bbb0-6aa6-4439-a131-9167c0d3a9e9%40googlegroups.com.