Hi,
I'm currently trying to use NHibernate with a MySQL server. I have a table with fields named like MySQL keywords, and this seems to be a problem with the MySQL Dialect of NHibernate.
Example of a generated query:
> insert into compinfos (ClientId, Order, Value, Name) VALUES (10, 1, 'Test2', 'Test')
The correct SQL will be:
> insert into compinfos (`ClientId`, `Order`, `Value`, `Name`) VALUES (10, 1, 'Test2', 'Test')
Is this possible to specify prefix and sufix to use before and after the fields names? I think it will probably be better if NHibernate was using this kind of field encapsulation by default.
I know this is maybe a wrong idea to use MySQL keywords as fields names, but since it's not my database, I don't have the opportunity to change that to a safer naming.
Thank you for your help, and for the great work NHibernate is.
PS : Sorry for my english, I'm not very fluent.
|