Hi Jörg,

On Aug 31, 2005, at 11:52 AM, Jörg von Frantzius wrote:

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).


I take it that that would be equivalent to FetchPlan.VALUES then?

FetchPlan.VALUES is no longer in the specification as of the Proposed FInal Draft.

I'm not sure about that, as FetchPlan.VALUES is not documented overly verbose in the Javadocs and the spec ;)

What happens is that the instance to be fetched using the fetch-depth of 1 is fetched as if it were being fetched by e.g. getObjectById. The current fetch plan is applied to the class to determine which fields are fetched.

Regards,

Craig



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


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







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!


Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to