Entities groups in transactions

Posted by Joel on Stack Overflow See other posts from Stack Overflow or by Joel
Published on 2010-03-29T11:22:28Z Indexed on 2010/03/29 11:23 UTC
Read the original article Hit count: 330

Filed under:

In the context of "Keys and Entity Groups" article by google: http://code.google.com/appengine/docs/python/datastore/transactions.html

1) "Only use entity groups when they are needed for transactions"

2) "Every entity belongs to an entity group, a set of one or more entities that can be manipulated in a single transaction."

It seems like entity groups exist only for the use of transactions, i.e. making one transaction possible between all entities in a group.

My question is then why are there parent-child relations between entities and not just a simple declaration of entities to be in a single group (that is defining A,B,C to be in the same group as opposed to defining relations between them "A (parent of) B, B (parent of C)").

What is the benefit from using parent-child relation model when the only purpose is for entities to be in the same group to make transaction possible?

Thanks

Joel

© Stack Overflow or respective owner

Related posts about google-app-engine