anyone have a recomendation on the best way to store millions of child
objects in data nuclues and maintain their relationship to a single
persistant parent?

On Oct 8, 10:21 am, Benjamin <[email protected]> wrote:
> sorry for the dup post
>
> I'm trying to find guidence on managing one to many releationships in
> the data store when the number of children the parent will have will
> be huge - 32000 children added to a parent a day
>
> a simple parent class:
>
> @PersistenceCapable(identityType = IdentityType.APPLICATION,
> detachable = "false")
> public class Parent  {
>
> �...@persistent(mappedBy = "parent")
> private  ArrayList<Child> points;
>
> a simple child class
>
> public class Child  {
> @Persistent
>  private Parent parent;
>
> and the parent arraylist is getting many children added to it and the
> datastore updated. I'm afraid that whenever i query for the parent
> object i'm going to get all of the children which i would never need
> to do - i would want to get parts of the children collection and i do
> want to maintain the relationship so parent deletes are cascaded.
>
> How do you query the datastore and get a parent without the children -
> it looks like the child collection gets populated by default when you
> just do a query like this:
>
>         Query q = pm.newQuery(Parent.class, "key== k");
>                 k.declareParameters("Long u");
>         List<Parent> result;
>         result = (List<Parent>) q.execute(key);
>
> with a huge number of children, wouldn't this query be very slow?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to