Free Hierarchical Data NHibernate
Hey everyone. Quick question about fluent syntax. I thought I got it right, but I'm having a weird failure. Basically I have a hierarchical structure that I am trying to keep and it all works, except when I do an actual w / db integration test.
I have a Node object that has a Parent property which is another Node and a _children field that supports the readonly Children property which is also a collection of nodes.
The property handler that correlates the relationship and the objects in memory are validated just fine. When I check them out from the repository (in-memory SQLite db in my tests) even though any of them Node Children includes for some reason. Any ideas?
My mappings are mostly done w / AutoMap, but I've overridden the following:
mapping.References(x => x.Parent);
mapping.HasMany(x => x.Children).Inverse().Access.LowerCaseField(Prefix.Underscore);
I also tried this without calling Inverse ().
source to share