0

I'm new to the Google App Engine Datastore and I'm having trouble understanding the entity keys. I have been letting the datastore automatically assign a key to entities. What I want to do is retrieve an entity's key in order to pass it as a parameter to another method. Is there a way to get it without manually setting a key when I add the entity to the database. I have so far been looking up entities by a function I wrote that gets a user from the database by querying for their specific email address. Any help would be really appreciated.

Thanks, Bob

Bob O'Brien
  • 1,583
  • 1
  • 11
  • 6

1 Answers1

0

use the key() method.

For example if you have an instance photo of the class Photo, then you can retrieve the key by photo.key()

Freddy
  • 164
  • 3
  • 13