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? I'm
not sure about that, as FetchPlan.VALUES is not documented overly
verbose in the Javadocs and the spec ;)
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!