Trying to configure SQL Ce database, and get the following exception on BuildSessionFactory().
Same configuration works for SQLite, but I’ve not used SQLCe before with NHibernate.
Any suggestions?
References:
System.Data.SqlServerCe 3.5.1.0
FluentNHibernate 1.2
NHibernate 3.1
Configuration:
Dim fluentConfiguration = Fluently.Configure() _
.Database(MsSqlCeConfiguration.Standard.ConnectionString(connectionString)) _
.Mappings(Function(m) m.FluentMappings.AddFromAssemblyOf(Of InstrumentMap)() _
.Conventions.Add(FluentNHibernate.Conventions.Helpers.DefaultLazy.Never())) _
.ExposeConfiguration(Function(c) InlineAssignHelper(cfg, c)) _
.Cache(Function(c) c.UseQueryCache())
sessionFactory = fluentConfiguration.BuildSessionFactory()
Exception in DBConnection.cs, at:
virtual public DataTable GetSchema(string collectionName) {
throw ADP.NotSupported();
}
System.NotSupportedException occurred
Message=Specified method is not supported.
Source=System.Data
StackTrace:
at System.Data.Common.DbConnection.GetSchema(String collectionName)
InnerException:
Btw; I get same exception if I omit the .ExposeConfiguration(..)
GetSchema is not supported by 3.5, but SQL Server Compact 4.0 supports GetSchema