1

Here, I have this datastore query which show the data of user according to their user id by filter option to particular user.

DatastoreService datastore = DatastoreServiceFactory.getDatastoreService();
Query query = new Query("EventDetail");
query.addFilter("Member", FilterOperator.EQUAL, user.getUserId());
List<Entity> events = datastore.prepare(query).asList(FetchOptions.Builder.withLimit(10));

But I want the datastore query to show data of all user that they have added like this. This does not work.

DatastoreService datastore = DatastoreServiceFactory.getDatastoreService();
Query query = new Query("EventDetail");
List<Entity> events = datastore.prepare(query).asList(FetchOptions.Builder.withLimit(10));

So, How can i get all data of users stored in the datastore.

Dan McGrath
  • 41,220
  • 11
  • 99
  • 130
norbugems
  • 31
  • 3

1 Answers1

0

Your query is very simple and seems to be correct.
If you don't get any data, just check that you have already saved some EventDetail in your datastore.
Check if your kind name is "EventDetail" in your datastore, and not "eventDetail" (the first letter is capitalized or not ?)

Have you tried this code : How to fetch all entities in App engine datastore?

Community
  • 1
  • 1
clebettre
  • 11
  • 2