Hi Walaa,
Thanks again for the reply
Basically as an example imagine I have a table which stores product categories, and a product category can have a parent (also a product category entity) or have null for the parentCategoryID column. If I want to retrieve all the descendents of a given product category I would need to know in advance how many generations are beneath it. I can do something like (excuse my lack of actual syntax the code is on another machine)
prefetch.add(childproperty).subpath(childproperty).subpath(childproperty)
and that would get me a collection of children, each of the children would also have a collection with it's children (assuming there are any). In some calling code I process the collection to build a tree view. When I get to a collection of entities that are grandchildren of the initial entity, if I had a lazy loading capability, when I accessed the collection that would store its children, it would load them if it had any. With the adapter model, because I specified only 3 generations to prefetch, their collections have count = 0. From memory there is some way to tell whether it has been loaded and there are no children, or whether it has not actually been loaded, maybe I need to use that and if it hasn't been loaded call a method which takes the entity and explicitly loads the collection, I was just wondering if there was a more elegant way.
Thanks again,
Matt