Feel free to file a feature request in the public tracker:
http://code.google.com/p/googleappengine/issues/list

- Jason

On Fri, Aug 14, 2009 at 12:36 AM, ray <[email protected]> wrote:

>
> Thanks Jason for the reply. I wish the descendants can be deleted
> automatically in a single transaction by setting the children property
> along the path and saving the root. Note that, in this way, the child
> that is excluded from children property of the root is deleted, while
> deeper level descendants are not.
> Sorry for my ignorance, but is this by design?
>
> Thanks,
> Ray
> On Aug 14, 2:47 am, "Jason (Google)" <[email protected]> wrote:
> > App Engine entity hierarchies ("entity groups") are implemented by
> including
> > the key of the parent (and its parent's parent, and so on) in its own
> key,
> > and once an entity is created, its key cannot be changed. Further,
> deleting
> > an entity does not recursively delete any child entities under it. If
> this
> > is what you're after, you'll have to implement it. Otherwise, the
> grandchild
> > entity will continue to exist and its relationship to its grandparent
> will
> > remain, even after its parent is gone.
> > For more on entity groups, seehttp://
> code.google.com/appengine/docs/python/datastore/keysandentityg...
> > .
> >
> > - Jason
> >
> >
> >
> > On Wed, Aug 12, 2009 at 9:09 PM, ray <[email protected]> wrote:
> >
> > > Hi,
> >
> > > I have an entity that has a 1-M relationship using JPA:
> > > @Entity
> > > public class Person {
> > >        @Id
> > >        @GeneratedValue(strategy = GenerationType.IDENTITY)
> > >        @Extension(vendorName = "datanucleus", key = "gae.encoded-pk",
> value
> > > = "true")
> > >        private String encodedKey;
> >
> > >        private String parent;
> >
> > >        @OneToMany(cascade = CascadeType.ALL)
> > >        private List<Dimension> children = new ArrayList<Dimension>();
> > > }
> > > Children and grandchildren can be created excellently when saving a
> > > parent Person. However, when I update its children property, its
> > > grandchildren cann't be deleted, while its son can be deleted.
> >
> > > For example, at first the relationship is Parent - Son - Grandson.
> > > Then I set set the children of Son to empty, and call dao.save
> > > (Parent). Grandson remains there, while it should have been deleted.
> >
> > > A limitation or something wrong with my code?
> >
> > > Thanks,
> > > Ray
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" 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-java?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to