I am setting up Castle Active Record to access a legacy database on an Microsoft SQL Server. The table in question has a column named function. When I attampt to load a record it gives me this error:
Incorrect syntax near the keyword 'function'
This error comes about because the SQL query nhibernate generates attempts to access the column named function, which happens to be a restricted keyword. The fix is to wrap the column name in square braces ([function]) in the SQL statement. Is it possible to tell nhibernate to do this in its autogenerated SQL?