gpt4 book ai didi

google-app-engine - GAE : Child object that is not in the class

转载 作者:太空宇宙 更新时间:2023-11-03 15:37:13 25 4
gpt4 key购买 nike

我正在尝试复制 Building Scalable, Complex Apps on App Engine 中描述的模式.我无法理解如何告诉 GAE Message 索引是 Message 的子项。来自 google ,他们说您通过将子对象包含在父类中来创建子对象,但这正是我们试图阻止的。那么如何将实体存储为子实体而不将其包含在父类中。

最佳答案

在实体组的上下文中,“child”表示 MessageIndex 的 key 是 Message 键的后代。这并不意味着 MessageIndex 列表(或集合)是消息的属性。

有关如何在 Java 中执行此操作的示例,请参阅事务文档中标题为“使用实体组创建实体”的部分。 http://code.google.com/appengine/docs/java/datastore/transactions.html

关于google-app-engine - GAE : Child object that is not in the class,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3840414/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com