Muhammad Hamid Raza
Muhammad Hamid Raza

Reputation: 205

what is the entity group of root entity in GAE?

We all know that the entities in the GAE make up a hierarchy just like file system. And while creating an entity we can specify an entity as a parent of an another entity to make up an entity group. This will help us in achieving strong consistency. An entity's parent, parent's parent, and so on recursively, are its ancestors; its children, children's children, and so on, are its descendants

I read on GAE docs that "An entity without a parent is a root entity." I am trying to understand to which group this root entity belongs? Does it belongs to its own group?

Upvotes: 2

Views: 141

Answers (1)

Dan Cornilescu
Dan Cornilescu

Reputation: 39824

Yes, root entities belong to their own group.

If a root entity has descendants they would also belong to that group, if not the group would only contain the root entity.

It's worth noting that the entity group could exist even without a root entity - when descendant entities are created they only need the key for the root entity, the entity itself doesn't need to exist.

Upvotes: 2

Related Questions