App Engine 数据存储中的祖先
我从事 Google App Engine 开发已经有一段时间了。我注意到但还没有机会使用的功能之一是数据存储中的“祖先”。
在什么情况下这会很有用?
I've been developing for Google App Engine for a while. One of the features I've noticed but haven't had an opportunity to use yet is "ancestors" in the data store.
What would be an example of a situation where this is useful?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
当您创建具有父实体的实体时,这些实体将放置在同一实体组中。 App Engine 中的事务只能在单个实体组中工作,因此如果您需要事务,则需要实体组。如果不需要事务,则不需要实体组(特别是,要在不需要事务功能的实体之间建立关系,您应该使用ReferenceProperties,而不是父子关系。)
When you create an entity with a parent, the entities are placed in the same Entity Group. Transactions in App Engine can only work within a single entity group, so if you need transactions, you need entity groups. If you don't need transaction, you don't need entity groups (in particular, to build relationships between entities that don't need transactional capabilities, you should use ReferenceProperties, not parent-child relationships.)