一个祖先在一个 List 对象中拥有数百万个子对象是否安全?
我正在将 Java 和 JDO 与 Google App Engine 数据存储结合使用。
如果我有一个 @PersistenceCapable 类,其中包含另一个列表 @PersistenceCapable 类,该列表的大小为数百万个项目, 可以吗?
这是否超出了 Java 列表大小的最大值?
对于一个祖先来说,最好的方式是什么? 仍然可以轻松添加新的子项,而无需加载大量数据 记忆?
I'm using Java and JDO with the Google App Engine datastore.
If I have a @PersistenceCapable class that contains a List of another
@PersistenceCapable class, and that List is millions of items in size,
is that OK?
Does that exceed a maximum for Java's List size?
What is the best way for an ancestor to have millions of children and
still have it easy to add new children without loading tons of data in to
memory?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
通常,可用的 OR 映射工具的典型父子关系不适合子数量庞大的此类场景。
我有 类似的情况 我们从 OR 映射中删除了映射部分,并在需要的地方使用显式调用加载子项。
我们可以应用各种优化,例如仅获取所需的子项或按页面获取它们等。
Generally the typical parent-child relationship of the available OR-mapping tools is not suited fro these type of scenarios wherein the children are huge in number.
I had similar scenario and there we removed the mapping part from OR mapping and loaded the children using explicit calls wherever needed.
We could apply various optimizations like fetching only the needed children or fetching them page-wise etc.