I'm trying to solve what I would think would be a more common problem that people run into with MongoDB, and hence Mongoose. Coming from a SQL background I would have expected that you could pass many fields into the distinct method and gotten back an object with the distinct values for each field passed in.
For the purposes of my first project using MongoDB & Mongoose where I need something like this I could just tie together an object that contains the distinct values I need but I'd like the code to be more portable.
I've already asked the question and posted a bit of example code on stackoverflow here:
http://stackoverflow.com/questions/31683533/no-value-for-distinct-has-been-declaredIt would be great to get some help in putting this together.