Hi,
As you see in the exception your class is a proxy, which I believe is the default for class mappings since v. 1.2.0. This means that the Id is known, and only if any other property is required, the database is hit to actually load your instance.
So, no, you can use your object without any knowledge of NHibernate, but in your DAL you have to make sure the proxy gets initialized, e.g. by NHibernateUtil.Initialize(), or otherwise mark your class as lazy=false. The same goes for any lazy collections you'll need beyond your DAL.
|