I have some models in my datastore and I wanted to add in a parent relationship as described by the parent keyword in the constructor on this page:
http://code.google.com/appengine/docs/python/datastore/modelclass.html
Is this possible and if so, what would be the cleanest way to do it?
Thanks
You can't; the parent's key path is part of the entity's key, which can't be changed after the entity is in the datastore. You'll need to create a new entity with the same data and the new parent and delete the original entity.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With