Impossible to provide a naming strategy
I need to determine some table names dynamically when the session factory is created. In normal NHibernate you can do this via Configuration.SetNamingStategy, but this has to be done before mappings are assigned. The way FluentConfiguration is set up makes this impossible; all configuration alterations are applied after mappings are set up. Right now I'm punching in via Reflection and setting the naming strategy before BuildConfiguration is called. I would much rather have a public API at hand to do this properly. (And yes, I probably should've built from source with necessary modifications.)
Support Staff 2 Posted by James Gregory on 15 Jul, 2010 08:13 PM
Fluently.Configure has an overload that takes a pre-initialized
Configuration instance, can't you use that?
3 Posted by Promit Roy on 15 Jul, 2010 08:18 PM
Oh, maybe. Can I just pass it a blank Configuration with the naming strategy set?
Support Staff 4 Posted by James Gregory on 15 Jul, 2010 08:22 PM
Yep.
5 Posted by Promit Roy on 15 Jul, 2010 08:32 PM
One quick refactor later and everything looks good. Thanks!