Closed
Description
Schema validation (NHibernateSchemaValidator.Validate()
) using SQLite (or SQL Server CE) and a specific schema fails for a generated/exported schema (NHibernateSchemaExport.Create(false, true)
).
Example which works:
schema name: [n/a]
entity name: "TestEntity"
exported result:
MsSql: "dbo.TestEntity"
SQLite: "TestEntity"
No NHibernate.SchemaValidationException
.
Example which fails:
schema name: "Test"
entity name: "TestEntity"
exported result:
MsSql: "Test.TestEntity"
SQLite: "Test_TestEntity"
NHibernate.SchemaValidationException
for SQLite (MsSql works fine):
Message
-------
Schema validation failed: see list of validation errors
Source
------
NHibernate
TargetSite
----------
Void ValidateSchema(NHibernate.Dialect.Dialect, NHibernate.Tool.hbm2ddl.IDatabaseMetadata)
StackTrace
----------
bei NHibernate.Cfg.Configuration.ValidateSchema(Dialect dialect, IDatabaseMetadata databaseMetadata)
bei NHibernate.Tool.hbm2ddl.SchemaValidator.Validate()
...
HResult (System.Int32)
----------------------
-2146233088
ValidationErrors (System.Collections.ObjectModel.ReadOnlyCollection`1[System.String])
-------------------------------------------------------------------------------------
0: System.String: Missing table: TestEntity
Somehow the specified schema gets ignored doing the validation.
Can so far be reproduced with NHibernate 4.x to 5.0.3 (never tried that with earlier versions).