#
Maverick
I write a demo. It includes guestbook.data and guestbook.web.
I put users.cs and user.hbm.xml into the folder of guestbook.data.
The hbm.xml file is set to embedded resource and config informations are added into web.config.
It compiles successfully.
But, When i add an user in useredit.aspx of guestbook.web, it throws an exception:
NHibernate.MappingException: No persisters for: Guestbook.Data.Users at NHibernate.Impl.SessionFactoryImpl.GetPersister(Type theClass) at NHibernate.Impl.SessionImpl.GetPersister(Type theClass) at NHibernate.Impl.SessionImpl.SaveWithGeneratedIdentifier(Object obj, CascadingAction action, Object anything) at NHibernate.Impl.SessionImpl.Save(Object obj) at Guestbook.Web.UserEdit.btnAdd_Click(Object sender, EventArgs e) in e:\website\www\guestbook\guestbook.web\useredit.aspx.cs:line 95
In Cuyahoga, all hbm.xml are in folder of Cuyahoga.Core.Domain.
Why my demo does not work?
BTW: I find that martijn is famous in NHiberante forum:)
I put users.cs and user.hbm.xml into the folder of guestbook.data.
The hbm.xml file is set to embedded resource and config informations are added into web.config.
It compiles successfully.
But, When i add an user in useredit.aspx of guestbook.web, it throws an exception:
NHibernate.MappingException: No persisters for: Guestbook.Data.Users at NHibernate.Impl.SessionFactoryImpl.GetPersister(Type theClass) at NHibernate.Impl.SessionImpl.GetPersister(Type theClass) at NHibernate.Impl.SessionImpl.SaveWithGeneratedIdentifier(Object obj, CascadingAction action, Object anything) at NHibernate.Impl.SessionImpl.Save(Object obj) at Guestbook.Web.UserEdit.btnAdd_Click(Object sender, EventArgs e) in e:\website\www\guestbook\guestbook.web\useredit.aspx.cs:line 95
In Cuyahoga, all hbm.xml are in folder of Cuyahoga.Core.Domain.
Why my demo does not work?
BTW: I find that martijn is famous in NHiberante forum:)