To get consistent queries with HRD, we are told to use ancestor queries.
i am using JDO, however i cannot find an example of an ancestor query using JDO Query.
can someone tell me开发者_如何转开发 if its possible, and if so can you point me to an example?
thank you.
No, there's no way to do ancestor queries in JDO, only in the low-level API. If you have a choice of database frameworks, though, I would strongly recommend switching to Objectify.
If you must use JDO, you could add a 'parent' property to each child entity, which would allow you to query on the immediate parent of an entity.
精彩评论