Does SQL Server CE support schema updates using NHibernate?

SchemaExport seems to work, but SchemaUpdate does not work - 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)
+3
source share
2 answers

SQL Server Compact 4 supports GetSchema - use this version instead of 3.5

+2
source

OK, I think it’s more interesting why the schema update will not work with Compact Edition MS SQL.

, NHibernate, . MS SQL CE System.Data.SqlServerCe.SqlCeConnection.GetSchema() . DbConnection.GetSchema(). :

  • SqlCeConnection , . , NotSupportedException

  • NHibernate , MS SQL CE, . , , ​​MS

0

Source: https://habr.com/ru/post/1734396/


All Articles