Is there any simple way make count queries with Activate?
What I’m doing today is something like this:
transactional {
allWhere[NaturalPerson].size
}
However, I’m not sure if this is the right way of doing things.
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 are two options:
Both has good performance, but the second one has better performance and can be used on versions after or equal 1.0-RC2.
Note that you are using allWhere without conditions. This won’t compile. Use just “all” if you don’t have conditions.