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

后端 未结 6 2292
难免孤独
难免孤独 2021-02-15 11:50

\"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 use

6条回答
  •  广开言路
    2021-02-15 12:29

    My first guess is that NHibernate identifies a column and/or table name as a reserved word. Your class named "hibernate" could be a likely culprit but without more information about your error it's a bit hard to track down. Some suggestions:

    1. try renaming the table and columns both in the database and config and give it a test
    2. Download log4net (http://logging.apache.org/log4net/download.html) and check out https://www.hibernate.org/364.html to configure it for nhibernate. Set it to debug and dig into the log file and see the full information on the stacktrace/error you get.

提交回复
热议问题