Craig Russell schrieb:

Hi Jörg,

The fields to be fetched from the instance(s) reachable from this field are governed by the fetch plan in effect. That is, the fetch groups in the fetch plan are used to determine the set of fields to be fetched. So all of the primitive fields in the fetch groups would be fetched (and none of the relationship fields, as you pointed out).

From looking at all occurrences of "fetch-depth" in the PFD spec, I couldn't find anything that elaborates on my next question:

Do you agree that it if we have a choice of fetch-depths for the same field, because the current fetch plan includes multiple groups with different fetch-depths for the same field, that we then chose the maximum of these fetch-depths? That also means we have to interpret 0 as infinite (-1 would have somehow been more intuitive here).

Or do we take the minimum of all fetch-depths, with 1 being the smallest? That would mean people have to clear out the default fetch group, or any other predefined fetch groups that include the fields in question, in order to get rid of the default fetch-depth of 1 for their fields.


If you want only the primary key to be fetched, then you should specify fetch groups in your fetch plan that do not include "default" and don't include any of the other fields in the reached class.

Regards,

Craig

On Aug 31, 2005, at 10:47 AM, Jörg von Frantzius wrote:

Hi,

in the spec, in §12.7.2 it reads

   "Recursive fetch group references are controlled by the fetch-depth
   attribute. A fetch-depth of 0 will fetch the whole graph of
   instances reachable from this field. The default is 1, meaning that
   only the instance directly reachable from this field is fetched."

For a fetch-depth of 1, when we fetch such a reachable instance, what fields of that instance should be fetched exactly? All I know is we must not fetch any of its object fields, as recursion stops here. One solution would be to fetch only the primary key, would that be in the sense of the specification? It might seem strange, but for my application this makes the most sense.

Regards,
Jörg

--
__________________________________________________________
Dipl.-Inf. Jörg von Frantzius  |            artnology GmbH
                              |                Milastr. 4
Tel +49 (0)30 4435 099 26      |              10437 Berlin
Fax +49 (0)30 4435 099 99      |  http://www.artnology.com
_______________________________|__________________________



Craig Russell

Architect, Sun Java Enterprise System http://java.sun.com/products/jdo

408 276-5638 mailto:[EMAIL PROTECTED]

P.S. A good JDO? O, Gasp!




--
__________________________________________________________
Dipl.-Inf. Jörg von Frantzius  |            artnology GmbH
                               |                Milastr. 4
Tel +49 (0)30 4435 099 26      |              10437 Berlin
Fax +49 (0)30 4435 099 99      |  http://www.artnology.com
_______________________________|__________________________

Reply via email to