I think you already arrived the recommended solution to the issue of counting entities. For reference, the reason that the production environment only returned at most 1,000 is an artifact of the query mechanism that App Engine uses which can only return up to 1,000 results per query.
- Jason On Fri, Oct 30, 2009 at 9:07 AM, Pion <[email protected]> wrote: > > > http://code.google.com/appengine/docs/java/javadoc/com/google/appengine/api/datastore/PreparedQuery.html#countEntities%28%29 > shows > > int countEntities() > Retrieves the number of Entities that currently match this Query. > > I have the following method: > > protected int count(String kind) { > Query query = new Query(kind); > PreparedQuery preparedQuery = datastore.prepare(query); > return preparedQuery.countEntities(); > } > > On my Development Server, it returns the total number of the entities > which is over 40,000 entities. > > But when deploying it on GAE, it always returns 1,000 entities. Is > this because of this limitation > > http://code.google.com/appengine/docs/java/datastore/overview.html#Quotas_and_Limits > ? > If so, what is the best way to find total number of entities I have? > > Please correct me if my assumption is incorrect. > > Thanks in advance for your help. > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~----------~----~----~----~------~----~------~--~---
