Can somebody point me to a resource explaining how to define an entity
group please? The official doc
(http://code.google.com/appengine/docs/datastore/keysandentitygroups.html#Entity_Groups_Ancestors_and_Paths)
doesn't show much...
Thanks,
- Yagiz -
There really isn't anything more to it: by default, every entity is in
its own entity group; if you declare entity A to be the parent of
entity B, then B is in A's entity group instead of its own.
Dave.
Thanks Dave!
- Yagiz -
> My question is going to this:
>
> Can different entity kinds be part of a group?
Yes, definitely.
> I have blog Items, and each Item can have Comments (which have a
> ReferenceProperty to the 'parent' Item).
>
> I want to delete an Item and all its Comments, so I thought an entity
> group would be good to run in a transaction, otherwise if there was a
> problem, I could be left with orphaned Comments (without an Item), or
> an Item with missing Comments.
Be aware that writes are transactionally serialised for the entity
group it is changing. If you're deleting, that's probably not an
issue, though.
Dave.