【发布时间】:2011-06-08 18:32:43
【问题描述】:
我正在将我的应用程序切换到 Postgresql,我的架构中的所有表都是小写的,当我使用 NHibernate 进行查询时,它会在映射上的表名中添加双引号在 PascalCase 中并导致查询失败,告诉我该表不存在。
我可以轻松转到所有映射类并将 Table 方法更改为小写, 就像从 'Table("UserAccount")' 更改为 'Table("useraccount")' 但我宁愿不必这样做..
我想知道是否有任何方法可以告诉 nhibernate 不要在查询中对表进行双引号,以便正确找到它。
我试过这个:
PostgreSQLConfiguration.Standard.Raw("hbm2ddl.keywords","none").ConnectionString(x => x.Is(_connectionString));
它没有工作。我几乎会告诉 nhibernate 不要担心大小写,但在使用 postgres 时会遇到麻烦。
【问题讨论】:
标签: nhibernate postgresql case case-sensitive quote