Does SQL Server CE support schema update with NHibernate?

萝らか妹 提交于 2019-12-04 12:05:27

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

Seven

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:

  1. 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

  2. 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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!