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)

T

On Apr 18, 8:29 pm, gops <patelgo...@gmail.com> wrote:
> hi , i am designing a simple project based to do list. the idea is to
> define tasks under project ( no workflow - just "task is completed" or
> not is required. ) in a hirarchial way. i.e. each task has multiple
> task and that task may have other multiple task. a project can be said
> to be completed if all task under that project are completed. , i
> tought of using refrenceproeperty to create hirarchy , but could not
> figure out easy way ( which do not take more than 30 seconds to find
> all the children of a project and check weather it is completed or
> not ) . to detect if project is complete or not. how to design
> database for such job ? and also , if i need to copy the project in
> order to define another project , how to copy hierarchical data ?
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Google App Engine" group.
> To post to this group, send email to google-appeng...@googlegroups.com.
> To unsubscribe from this group, send email to 
> google-appengine+unsubscr...@googlegroups.com.
> For more options, visit this group 
> athttp://groups.google.com/group/google-appengine?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to