I'm using NHibernate with SQL Server 2005.
SQL rejects my Schema because I have an unquoted column name "User" which was auto generate from the property of my domain object.
<class name="Entity" table="Entities" lazy="false">
<id name="Id" />
<property name="User"/>
<property name="Domain"/>
<property name="Password"/>
</class>
I've tried the following config fragment:
configuration.Properties["keywords"] = "auto-quote";
But I still get the same error.
I've written a INamingStrategy
to quote all table and column names, but this seems slightly over kill but I don't what to have to manually set the column names for my mapping.
See http://nhforge.org/blogs/nhibernate/archive/2009/06/24/auto-quote-table-column-names.aspx for more detail on how it should work