Is there some way to perform a datastore.Get
by providing not the full path of the key, but, say, the root parent of an entity?
For instance, say there's a SubFolder
entity, under a Folder
entity which itself is under a User
entity. This doesn't work:
subFolderKey := datastore.NewKey(c, "SubFolder", "mySubfolder", 0, userKey)
datastore.Get(c, subFolderKey, subFolder)
even though mySubfolder
is a grandchild of userKey
.
Is there some way to do this without specifying full parent path?