How to debug Fluent nHibernate
- by Matt Thrower
Hi,
I'm having some trouble with Fluent nHibernate. I added a column to a table and I thought I'd correctly changed the mappings and the connected data objects to correctly reflect this. However when I tried to run my application again I kept getting this error:
System.Data.SqlClient.SqlException: Invalid column name 'Workflow_id'.
I really couldn't see what the problem was with the changes I'd made so I reverted back to the original versions of the mapping and data object files from source control and removed the offending column from the database. But I'm still getting the same error.
I'd like some advice on how to debug this. The SQL that gets reported on the error is semi-nonsensical:
SELECT regions0_.Page_id as Page5_1_, regions0_.Id as Id1_, regions0_.Id as Id27_0_, regions0_.RegionId as RegionId27_0_, regions0_.RegionTemplate_id as RegionTe3_27_0_, regions0_.Workflow_id as Workflow4_27_0_ FROM [Region] regions0_ WHERE regions0_.Page_id=?
And it won't execute as valid SQL anyway.
Any ideas as to where to go from here?