I am trying to save and retrieve data in google app engine in
hierarchical manner.

1.

In such a case ,where I am using key's for reference to another entity
(i.e parent --> child)

@PersistenceCapable(identityType = IdentityType.APPLICATION,
detachable = "true") public class Item {

@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
private Key key;

    @Persistent
private List<Key> childs;

    //
}

there is no replication of data.

Is it possible that child entities get saved automatically when parent
is saved in above case where I am using Keys ?

2.

If I tried same without keys ..

@PersistenceCapable(identityType = IdentityType.APPLICATION,
detachable = "true") public class Item {

@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
private Key key;

    @Persistent
private List<Child> childs;

    //
}

In this case when I saved parent entity then child's also get saved
automatically . But then there is replication of data i.e for
different child's of same parent there are separate copies of
parent's.

Can anybody give me some Ideas and Links ??

-- 
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 google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.

Reply via email to