I am using the NHibernate with Spring.Net. The SessionFactory is created by Spring.Net IOC.
In my case i need to change the table name to which entity is mapped during runtime. I figured out how to change the table name, but in order for this to take effect we need to rebuild the session factory.
I tried to get the nHibernate Configuration object by using following method and called BuildSessionFactory method but this throws error couldn't find DBProvider.
Is there is any API method in Spring.Net to rebuild the NHibernate SessionFactory.Code:LocalSessionFactoryObject f = (LocalSessionFactoryObject)ContextRegistry.GetContext().GetObject("&SessionFactory"); Configuration config = f.Configuration; config.BuildSessionFactory();


Reply With Quote
