I have been looking into document databases, specifically RavenDb, and all the examples are clear and understandable. I just can t find any example where we do not know beforehand how many levels a given structure has. As an example how would you persist a family tree given the following class:
public class Person{
public string Name {get;set;}
public Person Parent {get;set;}
public Person[] Children {get;set;}
}
In most examples I have seen we search for the aggregate root and make into a document. It is just not so obvious here what the aggregate root and boundary is.