How can I load all objects of a given view from the cloud storage using Objectify?

I have about a hundred objects stored in a cloud datastore with Kind

= Animal

. I would like to get everything Animal

from the database via low level API or with Objectify.

+3


source to share


1 answer


With Objectify, you can do the following:

List<Animal> animals = ofy().load().type(Animal.class).list();

      



Read the documentation on queries which explains in detail how to query Datastore

with Objectify. In a sense, I find the Objectify documentation is much easier to understand and concise compared to the GAE documentation.

+11


source







All Articles