case 【PreparedQuery.countEntities()】 is Deprecated。

but how can I get the Total Count of a specific Query?

the  【PreparedQuery.countEntities(FetchOptions fetchOptions) 】only
return the count specificed by fetchOptions!

ex.
Query query = new Query(Book.getKind());  // there are 3 entities with
"Book" kind in datastore zone
PreparedQuery pq = ds.prepare(query);
FetchOptions option = FetchOptions.Builder.withLimit(2);
out.println(pq.countEntities());                 // the count I really
want, but the method is Deprecated currently;
out.println(pq.countEntities(option));        // the count only return
2, but it should return 3 entity in this query;

3ks!

-- 
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 google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.

Reply via email to