Issue Details (XML | Word | Printable)

Key: JDO-405
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Craig Russell
Reporter: Ilan Kirsh
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
JDO

recursion-depth - fetching the whole graph with 0 or -1?

Created: 09/Aug/06 08:41 AM   Updated: 04/Oct/06 08:37 PM
Return to search
Component/s: None
Affects Version/s: JDO 2 final
Fix Version/s: JDO 2 maintenance release 1

Time Tracking:
Not Specified

Resolution Date: 04/Oct/06 08:37 PM


 Description  « Hide
In page 124: "A value of -1 means that the recursion-depth is not limited by traversing this field."
In page 127: "A recursion-depth of 0 will fetch the whole graph of instances reachable from this field"

Is there a difference between these two?

In addition, I think that -1 / 0 as a default might be better than 1 it terms of performance, because tracking such cycles has some overhead, which we might not want to pay for most fields in which this feature is not needed (and MaxFetchDepth is sufficient).

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Andy Jefferson added a comment - 09/Aug/06 09:05 AM
AFAIK the p127 comment is erroneous and is a cut-paste. Only one value is needed for representing "no limit" and this was -1 with "fetch-depth" (before the renaming) and is what 12.7.4 has (and would be consistent with what values maxFetchDepth takes).

I would add that page 129 has an example that uses "fetch-depth" which was removed/renamed, so this needs fixing.

I don't see a reason to change the default we agreed some time back. Default of maxFetchDepth of 1 and recursion-depth of 1 are both consistent with fetching just the immediate objects.

Craig Russell added a comment - 10/Aug/06 11:21 PM
> Only one value is needed for representing "no limit" and this was -1 with "fetch-depth" (before the renaming) and is what 12.7.4 has (and would be consistent with what values maxFetchDepth takes).

I agree with Andy. Without looking at the document's history, it is inconsistent, and should be -1 to indicate no limit.

> I would add that page 129 has an example that uses "fetch-depth" which was removed/renamed, so this needs fixing.

This has already been filed as a Change Log. See http://wiki.apache.org/jdo/ChangeLog

Craig Russell added a comment - 04/Oct/06 08:37 PM
This change will be part of the maintenance release.