Please help me understand entity hierarchies in GAE's Datastore

前端 未结 2 1227
死守一世寂寞
死守一世寂寞 2021-01-03 05:06

The Google App Engine Datastore allows each entity to have a parent entity, essentially a way to form an entity hierarchy. For example, an Employee<

2条回答
  •  粉色の甜心
    2021-01-03 05:48

    You should use entity groups only where required to define transactional domains. On App Engine, transactions can only modify entities within a single entity group - that is, entities with the same parent. If you don't need transactional integrity between two entities, they should not be in the same entity group.

    If you absolutely need global transactions, you can implement them yourself - see my blog post on the subject for an example. In reality, a relatively small proportion of apps actually need global transactions.

提交回复
热议问题