The preview documentation says that fetch group depth=0 is the default and
that depth=0 will recurse until the graph is exhausted.

The actual name on the @FetchGroup annotation seems to be "recusionDepth"
not "depth".  However the behavior seems that it only supports
recursionDepth=1
and setting it to any other value such is ignored.

For example we have an org chart application where a Department can
recursively report to higher departments.  I don't want to the make the
Department.reportsTo relationship EAGER, because I don't want to
bring in higher departments all the time in my application.  However
I do need to do a few queries where I bring in all higher departments and
I thought I could do defining a fetch group with "reportsTo" and a depth=0
and then adding that fetch group to the OpenJPAQuery.

But that does not seem to work.  Is this a code bug or is a document error?

Or an error in my understanding of FetchGroup depth ?

Reply via email to