Now you have a way to inject the translators of your own LINQ extensions or
a way to switch from default implementations, for some known
methods/properties, to your own implementations.
You can configure the LinqToHqlGeneratorsRegistry through XML
<property
name="linqtohql.generatorsregistry">YourLinqToHqlGeneratorsRegistry assembly
qualified name</property>
You can use your implementation per Dialect through the constructor of your
custom dialect
DefaultProperties[Environment.LinqToHqlGeneratorsRegistry] =
"YourLinqToHqlGeneratorsRegistry assembly qualified name";
You can configure the LinqToHqlGeneratorsRegistry by code with
configuration.Properties.Add(Environment.LinqToHqlGeneratorsRegistry,
typeof(YourLinqToHqlGeneratorsRegistry).AssemblyQualifiedName)
or
configuration.SetProperty(Environment.LinqToHqlGeneratorsRegistry,
typeof(YourLinqToHqlGeneratorsRegistry).AssemblyQualifiedName);
or
configure.LinqToHqlGeneratorsRegistry<YourLinqToHqlGeneratorsRegistry>();
And, as usual, if you want, YourLinqToHqlGeneratorsRegistry can be injected
with whatever you want if you have a custom implementation
of IObjectsFactory inside your own BytecodeProvider.
Welcome to the world of options, *Welcome to NHibernate!!*
--
Fabio Maulo