Background:
I\'m getting a mapping failure when trying to use nHibernate. The application consists of several assemblies. One of the assemblies is a
Re your comment - no you cannot add mappings once you constructed your session factory. You can however re-create the session factory. Keep in mind though that it can be expensive operation (a second or so).
You can add mappings at runtime at the moment your session factory is being constructed:
ISessionFactory sf = new Configuration()
.AddFile("Item.hbm.xml")
.AddFile("Bid.hbm.xml")
.BuildSessionFactory();
or with assemblies:
ISessionFactory sf = new Configuration()
.AddAssembly("NHibernate.Auction")
.BuildSessionFactory();