Using Lithiums Model, how do you achieve getting a distinct result set of specific fields from a collection in MongoDB?
mongo query:
db.blogs.distinct('url');
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There currently isn’t a way to do this elegantly to my knowledge. You can get results by working with the Pecl MongoDB object directly. The
commandfunction allows you to make any call you want.