I'm using a post hook for datastore puts and I'd like to be able to access the
id of an entity after
it's saved. Although I can access all the properties of the entity from the PB,
I don't have any
idea of how to access the key, and the only relevant document I've found
(http://code.google.com/appengine/articles/hooks.html) does not really go deep
enough into the
subject.
Any suggestions? Below is the code for the hook I'm using:
def post_hook(service, call, request, response):
if call is "Put":
for entity in request.entity_list():
# I'd like to get the key of the entity here
apiproxy_stub_map.apiproxy.GetPostCallHooks().Append('post_hook',
post_hook, 'datastore_v3')
--
Federico Builes
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---