I am working on a project where I need to travel through a massive graph of objects. One of the main entity is the Node which is shown below.
class Node { Node parent List<Node> children Node rightSibling Node leftSibling int rank }
I have the following issues/doubts
- If I dont declare explicitly the fetch strategy for "children" as FetchType.Eager, then how can I retrieve the Nodes stored in this list. Because no matter what I try, if I dont declare the FetchType to Eager, the children field of all my retrieved nodes are of size zero
- When I declare the FetchType as Eager, then isn't the database actually retrieving the whole graph stored in the database, considering that every Node in my graph is at some level descendant of the root Node.
I have been looking for an optimum persistence solution for my project for quite some time now. I have tried every combination of ORM and RDBMS but they are just not cut out for this kind of work. I also tried DB4O but it leaves a lot to be wanted. ObjectDB was a pleasant surprise until I got stuck with this problem. I would be indebted to you if you could solve this sticky situation.