Is it possible to change or assign a new parent to an instance of a model that is already in the data warehouse? For example, I need something like this
task = db.get(db.Key(task_key)) project = db.get(db.Key(project_key)) task.parent = project task.put()
but this does not work because task.parent is a built-in method. I was thinking of creating a new Key instance for the task, but there is also no way to change the key.
Any thoughts?
python google-app-engine transactions google-cloud-datastore
Vladimir Prudnikov
source share