JDO 和 Google App Engine 数据存储:代码中的关键表示

发布于 2024-12-29 03:25:51 字数 911 浏览 5 评论 0原文

我刚刚看完以下视频,试图 了解 JDO 和 Google App Engine 数据存储区:

现在我想知道,采取例如,我们有一个祖父母类型的实体 具有类型 Parent 的实体,具有类型 Child 的实体,如以下之一所示 视频。子实体之一的关键可能是:

Grandparent:Jane/Parent:Jack/Child:Joe
  1. 如何在 JDO 中为该实例编写类(大概会有 三个类)但我希望看到一个我们可以看到的实现 显式设置为键一部分的键值。有什么想法吗?

  2. 我还想知道,使用 JDOQL 访问我的有什么区别? 数据并以编程方式使用迭代器迭代各个实例?

谢谢,

约翰·戈奇

I have just finished watching the following videos in an attempt to
understand JDO and Google App Engine datastore:

Now I wonder, take the example where we have an entity of kind Grandparent
having an entity of kind Parent having an entity of kind Child as in one of
the videos. The key for one of the the Child entities could be:

Grandparent:Jane/Parent:Jack/Child:Joe
  1. How do I code the class for this instance in JDO (presumably there will be
    three classes) but I would like to see an implementation where we can see
    the key values set as part of the key explicitly. Any ideas?

  2. I also wonder, what is the difference between using JDOQL to access my
    data and iterating through the various instances using iterators programmatically?

Thanks,

John Goche

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

要走干脆点 2025-01-05 03:25:51
  1. App Engine 数据存储区 java 文档中有一个更具体的示例:子对象和关系
  2. 您可以使用 JDOQL 字符串语法构建数据存储区查询,并通过调用 Query 对象上的方法,访问数据时没有区别,两者都将返回Collection,您可以在 在 JDO 中引入查询
  1. There a more concrete example in the App Engine datastore java documentation: Child Objects and Relationships
  2. You can construct Datastore queries using JDOQL string syntax and by calling methods on Query objects, there is no difference when accessible the data both will return a Collection, you can see more concrete examples in Introducing Queries in JDO
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文