Hey all, I'm new to JPA. I'm trying to learn to write queries. Suppose I have GrandParents, Parents and Children entities with the obvious relationship. How do I write a query that fetches all three levels? I want something like this:
select gp from GrandParent as gp from GrandParent join fetch gp.parents join fetch gp.parents.children The first fetch works (if I comment out the second) but the second doesn't. I've tried a number of variations but can't seem to get the second level to fetch. (Posted the above to general JPA forum.) I am told JPA 1.0 supports only one level fetch. Is there some OpenJPA extension for fetching more? I don't really need this right now, I'm just trying to understand it all. Thanks. -- Daryl Stultz _____________________________________ 6 Degrees Software and Consulting, Inc. http://www.6degrees.com mailto:[email protected]
