Apache JDO Project - Re: JDO2 §12.7.2: fetch-depth only

This is Interesting: Free IT Magazines  
Home > Archive > Apache JDO Project > September 2005 > Re: JDO2 §12.7.2: fetch-depth only





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Re: JDO2 §12.7.2: fetch-depth only
Jörg von Frantzius

2005-09-28, 7:45 am

Hi Andy,

I'm seeing some problems with this current JPOX approach to fetch-depth,
and I hope I can make them understandable.

Andy Jefferson schrieb:

>Hi Michael,
>
>
>
>
>I agree. I interpret fetch-depth as being for "recursive references" (as the
>spec says). This encompasses
>1. self-referencing (A->A->A->... )
>2. circular-referencing (e.g A->B->C->A->B->C->.....)
>
>

With fetch-depth=1, how do you discover the circularity while obeying
the fetch-depth? (if the associations are all 1:n, you can't fetch the
whole path in one go, you'd need more than one fetch) And by the way, do
you mean circularity on class level or on object level (you don't do
static analysis of circles in the object model, do you?)

>This is what JPOX aims to support.
>The examples in the JDO2 spec are, incidentally, only of the self-referencing
>type.
>
>

Apart from the above problem, this approach makes it really hard for the
user to predict what gets fetched. Just imagine case 2. without the
circle (no C->A): if the user wanted to detach an A object, with the
number of C objects reachable being really really huge. How could he
avoid detaching that A object without detaching a big number of C objects?

In my opinion things would be so much simpler if fetch-depth applied to
all kinds of fields, and the control over the size of the fetched object
graph would be much better.

--
________________________________________
__________________
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
_______________________________|________
__________________


Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com