Currently, one must put() in order to have obj.key() be valid. In some
flows, I find my self having to put() object twice for this reason.
If I make a synthetic key, it appears that I can avoid this:
class Joker(db.Model):
unused = db.StringProperty()
def __init__(self):
m = hashlib.sha1()
m.update(str(time.time()))
name = base64.b64encode(m.digest())
logging.debug("name="+name)
db.Model.__init__(self, key_name=name)
1) GOOG folks - are there any performance downsides to taking this approach?
2) If no, are there any other environmental factors that might be
fodder for the hash (user, etc)?
Thanks,
Jeff
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---