SchemaExport seems to work, but SchemaUpdate fails - the SchemaUpdate.Exceptions contains this object:
System.NotSupportedException: The method is not supported.
in System.Data.Common.DbConnection.GetSchema(String collectionName, String[] restrictionValues)
in NHibernate.Dialect.Schema.AbstractDataBaseSchema.GetTables(String catalog, String schemaPattern, String tableNamePattern, String[] types)
in NHibernate.Tool.hbm2ddl.DatabaseMetadata.GetTableMetadata(String name, String schema, String catalog, Boolean isQuoted)
in NHibernate.Cfg.Configuration.GenerateSchemaUpdateScript(Dialect dialect, DatabaseMetadata databaseMetadata)
in NHibernate.Tool.hbm2ddl.SchemaUpdate.Execute(Action`1 scriptAction, Boolean doUpdate)
SQL Server Compact 4 supports GetSchema - use this version instead of 3.5
OK, I think it is of more interest why schema update will not work with the Compact Edition of MS SQL.
The stack trace implies that not a method of NHibernate fails, but the method for retrieving the current database schema.
When using the dialect for MS SQL CE there actually should be a call to System.Data.SqlServerCe.SqlCeConnection.GetSchema() within the stack trace. However, only DbConnection.GetSchema() appears. This means two things:
Class SqlCeConnection does not override the implementation of this method, hence the implementation of the base class will be called. However, the base class does nothing more than throwing a NotSupportedException
NHibernate or the dialect suitable for MS SQL CE cannot do anything about it. So, this would be an issue to be fixed by MS