> I understand we won't be able to change the key_name after saving, > Is it possible to set the key_name via some function call rather then > setting via constructor(Before Saving),So that i can able to use > get_by_key_name() once it is saved. > Looking at the source code it appears that you can set the key_name like this:
entity = MyModel() entity._key_name = my_key_name entity.put() However, I don't recommend doing it as this method of setting the key_name is not documented and can break in the future. Why wouldn't you initialise it in the constructor? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
