If u want to perform one more different entity save,update,delete operation
in a single transaction then you need to set a parent key to create same
entity group. In java you can use KeyFactory


Example:

tx.begin();

// Here root is a saved entity.  You have to load that entity when you want
to create key

Key entityAKey= KeyFactory.*createKey*(root.getKey(),
EntityA.*class*.getSimpleName(),
"EntityA"+UUID.*randomUUID*().toString());

Key entityBKey= KeyFactory.*createKey*(root.getKey(),
EntityB.*class*.getSimpleName(),
"EntityB"+UUID.*randomUUID*().toString());

EntityA a = *new* EntityA();

a.setKey(entityAKey);

EntityB b = new EntityB();

b.setKey(entityBKey);

pm.makePersistent(a);

pm.makePersistent(b);

tx.commit();



On Tue, Jun 22, 2010 at 8:06 PM, Simon <qila...@gmail.com> wrote:

> I suggest you read the documentation for storing data, in both the
> Python and Java sections.
>
> For example, the Python sections gives a good overview of Entity
> Groups here -
> http://code.google.com/appengine/docs/python/datastore/keysandentitygroups.html
>
> On Jun 22, 9:49 am, MANISH DHIMAN <manisd...@gmail.com> wrote:
> > Hi All
> > Please provide me some detail information about entity group.
>
> --
> 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-j...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine-java+unsubscr...@googlegroups.com<google-appengine-java%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
>
>

-- 
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-j...@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