Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for $count aggregation stage #998

Closed
evanchooly opened this issue Sep 16, 2016 · 5 comments
Closed

Add support for $count aggregation stage #998

evanchooly opened this issue Sep 16, 2016 · 5 comments

Comments

@evanchooly
Copy link
Member

JAVA-2277

@email2liyang
Copy link

@evanchooly any update on this? thanks

@evanchooly
Copy link
Member Author

I left the company some months back and no longer have write access to this repository. i can fork and submit a PR but I just haven't had the time.

@email2liyang
Copy link

@evanchooly thanks, is there any other repo maintainer for morphia project?

@jyemin
Copy link
Contributor

jyemin commented Sep 4, 2017

The $count stage is just syntactic sugar for:

{$group:{_id:null, count:{$sum:1}}}

so you should be able to accomplish this with the existing aggregation support in Morphia. See http://mongodb.github.io/morphia/1.3/guides/aggregation/ to get you started.

@email2liyang
Copy link

it works well, thanks!

@evanchooly evanchooly modified the milestones: 1.5.0, 2.0.0 Nov 14, 2018
@evanchooly evanchooly modified the milestones: 2.0.0, 2.1.0 Dec 6, 2018
@evanchooly evanchooly modified the milestones: 2.1.0, 2.0.0 Dec 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants