> "_ParentPersons" property that by default should return an empty collection if I don't want to load it explicitly in my DAO
My question would be, "why?". As in, why return an empty collection if
you don't want to load it explictly? The data either exists, or it
doesn't so, because Lazy is turned on, NH will get the collection
content (the data) when you access the property. Once its got the data
(or not, if there isn't any) you then have a collection object - which
is either populated or empty.
If you want a collection object to exist by default so that you can
add to it in code, just create the object in the constructor. NH will
overwrite this when it does lazy loading.
Do you want behaviour similar to Entity Framework, whereby you
explictly load the collection when you choose to do so, as opposed to
NH deciding when to load it? if so, I think this would be an explict
HQL/Criteria/Linq call to load the data for the Person object. I'm not
sure there is an equvilant mapping option in the HBM.