They only need to be virtual if your entity (and properties) are defined as lazy. That is because NHibernate generates at runtime subclasses of your entities, and must override its properties. You can either mark the entity as not lazy (and also its properties) or disable the verification altogether:
cfg.SetProperty(NHibernate.Cfg.Environment.UseProxyValidator, Boolean.FalseString); RP On Thursday, December 18, 2014 11:33:45 AM UTC, Greg Young wrote: > > dynamic proxies. > > On Wed, Dec 17, 2014 at 11:05 PM, Suhas Chatekar > <[email protected] <javascript:>> wrote: > > I am trying to map my domain classes directly without having separate > DAOs. > > My domain classes have some methods on it for business logic. But when I > map > > the domain entity, NH complains that these methods should also me marked > as > > virtual. Is it not strange when NH should not be even looking at those > > methods? > > > > -- > > You received this message because you are subscribed to the Google > Groups > > "nhusers" group. > > To unsubscribe from this group and stop receiving emails from it, send > an > > email to [email protected] <javascript:>. > > To post to this group, send email to [email protected] > <javascript:>. > > Visit this group at http://groups.google.com/group/nhusers. > > For more options, visit https://groups.google.com/d/optout. > > > > -- > Studying for the Turing test > -- You received this message because you are subscribed to the Google Groups "nhusers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/nhusers. For more options, visit https://groups.google.com/d/optout.
