Hi!

Here are my 5 cents.
NHibernate uses the following model:
1 - A Configuration instance stores all mappings and configurations, from 
many sources (XML, code);
2 - A Session Factory is built from a Configuration instance, picking 
whichever configuration it has at the moment of creation, and from now on 
all changes to the Configuration instance are not propagated to the Session 
Factory;
3 - A Session is built from a Session Factory, which does the actual 
accesses to the database and implements the first level cache and unit of 
work.

It is possible to add or change dynamically mappings, even code-generated 
ones, at any time, but these will not be known by any existing Session 
Factory, we have to build a new one. It is ok if your Session Factory is 
hidden behind some abstraction, like a Service Locator and you get a new 
Session everytime you need to persist things (which you should do anyway).

RP


On Tuesday, May 14, 2013 2:44:44 AM UTC+1, terryclancy wrote:
>
> I am new to nHibernate and trying to determine if it will fit my needs and 
> would appreciate some guidance please.
>  
> I am trying to understand if an application dynamically creates new 
> classes or dynamically adds or removes properties of classes does 
> nHibernate support the run time creation or modification of those classes 
> and the changes necessary in SQL Server to persist those changes ?
>  
> I appreciate any guidance you can give me on this question.
>  
> Thanks
>  
> Terry Clancy
>

-- 
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?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to