Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MySQL & NHibernate. How fix the error: Column 'ReservedWord' does not belong to table ReservedWords?

"I am getting a weird error when using NHibernate. And I don't know what is causing this error. I am new to the whole Visual Studio and NHibernate, but not to Hibernate. I used Hibernate in the past in Java projects.

Any help would be appreciated in pointing me where my error is.

I am using Visual Studio 2008 SP1 with Mysql 5.1.

Below is the code I am using. "

The full code and examples are posted here: https://forum.hibernate.org/viewtopic.php?f=25&t=997701

like image 444
Eduardo Xavier Avatar asked Jun 29 '09 23:06

Eduardo Xavier


1 Answers

FYI for any NHibernate/Fluent NHibernate newbies like myself, FCastellanos' solution worked for me as well (I got the error on Windows as well), and the Fluent NHibernate way to add that configuration is:

Fluently.Configure()
    ...
    .ExposeConfiguration(c => c.Properties.Add("hbm2ddl.keywords", "none"))
    ...
    .BuildSessionFactory()
like image 73
Andy Morris Avatar answered Sep 20 '22 11:09

Andy Morris