I setup a table for storing messages without much thought, I created a table with the following names among others: From, To, Read etc...
The migration ran fine, creating the table without issue, trying to read or insert into the table caused SQL errors. It then became apparent that i had chosen a bunch of column names that were SQL keywords, hence the SQL errors.
Using FluentNHibernate in the past I have just mapped names as "From" => "[From]" which fixes the issues.
Is it possible to do this in orchard?
Whats is the best end solution:
- Don't use column names that are keywords?
- File a bug in orchard subjecting that all column names should be wrapped in "[" + "]" to prevent future problems?
- Maybe a attribute that allows column names and entities to differ?