Since long time we have a very interesting request on NHibernate JIRA (NH-188).
If you are working in a multi-RDBMS application, you are annoyed, for sure, quoting a table-name or a column-name. As a very good persistent-layer this should be a NHibernate’s work.
I’m happy to announce that the problem is solved (even if, so far, is not done by default).
If you want that NH take the responsibility of properly quote table-name or column-name only where really needed now you can do it in two ways:
As you probably know NHibernate’s configuration has some property oriented to mapping-to-DLL tasks.
For schema integration you can use
Allowed values for hbm2dll are:
The new property is:
Allowed values are:
When you have an instance of a configured configuration (just before call BuildSessionFactory) you can execute:
Take a look to this mapping:
Well… now it is working fine without explicitly quote.
Enjoy NHibernate’s multi-RDBMS easy support.