Column ‘ReservedWord’ does not belong to table ReservedWords.

I just tried upgrading to MonoRail 2.0 and AR 2.1 and bang:

Castle.MonoRail.Framework.MonoRailException:
Error processing MonoRail request. Action CreateTestData on controller Admin --->
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. --->
System.ArgumentException: Column 'ReservedWord' does not belong to table ReservedWords.
at System.Data.DataRow.GetDataColumn(String columnName)
at System.Data.DataRow.get_Item(String columnName)
at NHibernate.Dialect.Schema.AbstractDataBaseSchema.GetReservedWords()
at ...

Apparently NHibernate have had some issues with later versions of MySQL Connectors.
Luckily I found a solution/work around in this thread.

disable the keywords auto-import or try to fix the schema-metadata
implementation
http://fabiomaulo.blogspot.com/2009/06/auto-quote-tablecolumn-names.html

So I just added this line to the NHibernate configuration:

<add key="hbm2ddl.keywords" value="none"/>

And then it started working again.

No comments yet.

Leave a Reply