Saturday, June 16, 2012

App Engine: Entity

https://developers.google.com/appengine/docs/python/datastore/entities


Each entity in the Datastore has a key that uniquely identifies it. The key consists of the following components:
  • The kind of the entity, which categorizes it for the purpose of Datastore queries
  • An identifier for the individual entity, which can be either
  • key name string
  • an integer numeric ID
  • An optional ancestor path locating the entity within the Datastore hierarchy

The name of the model class becomes the kind of the entities belonging to it.

In addition to a kind, each entity has an identifier, assigned when the entity is created. Because it is part of the entity's key, the identifier is associated permanently with the entity and cannot be changed. It can be assigned in either of two ways:
  • Your application can specify its own key name string for the entity.
  • You can have the Datastore automatically assign the entity an integer numeric ID.

No comments:

Related Posts Plugin for WordPress, Blogger...