Please help me understand entity hierarchies in GAE's Datastore

有些话、适合烂在心里 提交于 2019-11-30 15:32:15
Nick Johnson

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.

A typical usage of Parent feature instead of ReferenceProperties is for transactions.
Google App Engine allows transactions just on entities in the same entity group, ie a set of entities with the same parent.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!