JDO 和 Google App Engine 数据存储:代码中的关键表示
我刚刚看完以下视频,试图 了解 JDO 和 Google App Engine 数据存储区:
- http://www.youtube.com/watch?v=2jW2iSKDipY
- http://www.youtube.com/watch?v=Yl_J-UYE94w
- http://www.youtube.com/watch?v=pzctc48c0BM
- http://www.youtube.com/watch?v=tx5gdoNpcZM
现在我想知道,采取例如,我们有一个祖父母类型的实体 具有类型 Parent 的实体,具有类型 Child 的实体,如以下之一所示 视频。子实体之一的关键可能是:
Grandparent:Jane/Parent:Jack/Child:Joe
如何在 JDO 中为该实例编写类(大概会有 三个类)但我希望看到一个我们可以看到的实现 显式设置为键一部分的键值。有什么想法吗?
我还想知道,使用 JDOQL 访问我的有什么区别? 数据并以编程方式使用迭代器迭代各个实例?
谢谢,
约翰·戈奇
I have just finished watching the following videos in an attempt to
understand JDO and Google App Engine datastore:
- http://www.youtube.com/watch?v=2jW2iSKDipY
- http://www.youtube.com/watch?v=Yl_J-UYE94w
- http://www.youtube.com/watch?v=pzctc48c0BM
- http://www.youtube.com/watch?v=tx5gdoNpcZM
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
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?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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Query
对象上的方法,访问数据时没有区别,两者都将返回Collection
,您可以在 在 JDO 中引入查询Query
objects, there is no difference when accessible the data both will return aCollection
, you can see more concrete examples in Introducing Queries in JDO