一个祖先在一个 List 对象中拥有数百万个子对象是否安全?

发布于 2025-01-06 15:19:55 字数 229 浏览 3 评论 0原文

我正在将 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

素食主义者 2025-01-13 15:19:55

通常,可用的 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文