首页 文章

Sqlite会忽略NHibernate默认架构

提问于
浏览
1

使用NHibernate架构导出时,我按如下方式配置它:

Fluently().Configure
            .Database(SQLiteConfiguration.Standard
                .DefaultSchema("someschema")
                .Provider<SqliteInMemoryDriverConnectionProvider>()
                .ShowSql()
                .FormatSql()
                .Raw(Environment.GenerateStatistics, "true"))

但是,当我查看生成的表(使用SchemaExport)时,它们的生成方式如下:

Create table dbo_sometable ...

它看起来仍然使用标准的dbo前缀 . 如何在没有dbo前缀的情况下生成表?

更多信息:

我'm trying to run some integration tests using NHibernate in-memory. I do some NHibernate inserts and updates (they work fine, since they automatically add the schema prefix as well). I' m也在同一个表上做一些手动查询,只使用表名 . 在实时代码上这很好(对于MS SQL Server数据库),在测试代码中失败,因为它找不到表 sometable ,因为它生成为 dbo_sometable

1 回答

  • 0

    您的映射似乎设置了架构 .

相关问题