-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Minor
-
None
-
Affects Version/s: None
-
Component/s: Domain Model
-
None
The current definition of the "getDescendants" method can take in 3 values for the "depth" parameter:
- 1: Which behaves like GetChildren
- -1: Which gets ALL descendants, regardless of depth
- [2..n]: Which gets ONLY decendants up to the depth level specified.
But I'm not sure that many repositories can handle the [2..n] case very efficiently. (E.g. in SharePoint the native data tables make this query non-trivial to execute, even though the "-1" and "1" cases are very efficient.)
Should we provide a way for repositories to say that they don't support getting an arbitrary depth of children? Or maybe just remove that case, by saying that getChilren is ALWAYS with a depth of "-1" (i.e. remove the parameter entirely?)