Just to consult the NHibernate gurus out there, I know (and extensively use) lazy loaded collections.
To date, however, I have been unable to nail down what it means to set lazy attribute on the class level.
On our existing hbm files, all of them have class nodes with lazy set to false. e.g.
<class name="Decision" lazy="false" ...>
I've experimented by removing this attribute (thereby default which is true) and the result is I get an InvalidProxyTypeException.
I think it's because it's setting all properties (ie reference types) AND collections as lazy="true", no matter if they're meant to be data objects or not.
So my question is, is this assumption correct? Does setting lazy="true" at the class node level of NHibernate configuration set ALL the reference types AND collection types as lazy="true" by default? Is there anything else the lazy="true" does at the class level?
If what I said above is true, then it also means that it's NOT possible to mix normal properties with data properties inside your domain objects UNLESS you also set those properties to virtual, even if it's not necessary e.g.
public virtual FirstName {get; set;}
public virtual LastName {get; set;}
public FullName {get{ return FirstName + " " + LastName;}} // InvalidProxyTypeException thrown!