Here is the approach I would probably take unless you have many
hundreds of child tasks.
I would keep a list of keys of all children of each project/task.
(You can then do a db.get and get all immediate children with single
call)
and each child has a reference to it's parent. In addition in each
item keep a list of all parents keys back to the root. That way you
can search for all children
in part of the tree/subtree
(This approach is especially useful if you have multiple child types)
as back ref sets
are kind specific.
Keep a running count of complete children at each level, rather than
trying to calculate the current state in a single big function, (keep
these subsidiary values up to date through tasks)
1 - 2 of 2
Showing 20▼ items per page