I have managed to track this down to column names. I changed the SchemaUpdate to make it print out the sql statements and ran them.
This generated SQL errors which did not cause my schema update to fail (said all was OK). I had used the name "Order" as a property name on my class, which is of course a reserved word in SQL. I changed the name to something else and all works fine.
For the next person, the way to troubleshoot this is :
Make FNH generate the hbm.xml files. You do this by calling ExportTo on your AutoMap Configuration:
.Mappings(m => m.AutoMappings.Add( AutoMap.AssemblyOf<CupTree>(config) .Conventions.Add( DefaultLazy.Never(), Table.Is(x => x.EntityType.Name + "s")) .UseOverridesFromAssembly(Assembly.GetAssembly(typeof(CupTreeOverride))) ).ExportTo(@"C:\nh.out"))
Check the outputted files and make sure everything is correct. If not, you have a mapping problem.
If your xml files are good, check the SQL statements it runs. You do this by setting the first parameter (script) on SchemaUpdate.Execute to true.
.ExposeConfiguration(cfg => new SchemaUpdate(cfg).Execute(true, true))
Copy and paste the generated SQL and run it against the database. If there are any problems, you'll get errors and can take it from there.