Considering
class Category (db.Model):
name = db.Stringproperty ()
Say I have a nested hierarchy
-root
| -a
| | -b
| | -c
| -x
| -y
| -z1
| -z2
where a parent root , b parent a , c parent b , etc.
Is there an easy way to move node y from x to b so that z1 and z2 continue to be children of y :
-root
| -a
| | -b
| | -c
| | -y
| | -z1
| | -z2
| -x
This means that I just change the parent y .
However, if this is not possible, it will require
- creating a new entry
ny = Category(parent=b, name=y) and - recursively for each child
y creating a new record with ny as the parent and - than removing
y and its children.
google-app-engine google-cloud-datastore
molicule
source share