Hi.
Another solution is to use a naming strategy in your configuration.
Here is a sample access naming strategy i am using.
Code:
public class AccessNamingStrategy : NHibernate.Cfg.INamingStrategy
{
public AccessNamingStrategy()
{
}
public string ClassToTableName(string className)
{
return "[" + DefaultNamingStrategy.Instance.ClassToTableName(className) + "]";
}
public string PropertyToColumnName(string propertyName)
{
return "[" + DefaultNamingStrategy.Instance.PropertyToColumnName(propertyName) + "]"; }
public string TableName(string tableName)
{
return "[" + tableName + "]";
}
public string ColumnName(string columnName)
{
return "[" + columnName + "]";
}
public string PropertyToTableName(string className, string propertyName)
{
return "[" + DefaultNamingStrategy.Instance.PropertyToTableName(className, propertyName) + "]"; }
}