Google App Engine JDO 查询引用其他表
我有包含任务实体列表的实体项目。我知道项目实体 id,现在我需要获取项目任务列表(任务包含项目 id)。如何使用 JDO 在 GAE 中进行此类查询?
I have entity project that has list of task entities. I know project entity id and now I need to get list of project tasks (tasks contain project id). How can I make that kind of query in GAE with JDO?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果没有具体的示例,我只能提供通用的操作信息。
看看这个系列:
http://www.ibm.com/developerworks/java/library/j -gaej1/
http://www.ibm.com/developerworks/java/库/j-gaej2/index.html
http://www.ibm.com/developerworks/java/library/ j-gaej3.html
特别是最后两个。他们很好地描述了如何使用持久性引擎。
我认为您想要做的是在两个实体之间创建一种关系。这很棘手,但您可以在这里找到一些信息:
http://gae-java-persistence.blogspot.com/
除了 GAE 之外, 文档,位于:
http://code.google.com/appengine/docs/java/数据存储/relationships.html
Without a specific example I can only provide generic how-to info.
Look at this series:
http://www.ibm.com/developerworks/java/library/j-gaej1/
http://www.ibm.com/developerworks/java/library/j-gaej2/index.html
http://www.ibm.com/developerworks/java/library/j-gaej3.html
Specially the last two. They describe very well how to use the Persistence engine.
I think that what you are trying to do is create a relationship between two entities. That is tricky, but you can find some info here:
http://gae-java-persistence.blogspot.com/
in addition to the GAE docs, which are here:
http://code.google.com/appengine/docs/java/datastore/relationships.html