开发者

Disable Table Name Double Quoting on FluentNhibernate

I am switching my application to P开发者_如何学Pythonostgresql, All the tables in my schema are in lowercase and when I'm doing a query with NHibernate it is adding double quotes to the table name which on the mappings is in PascalCase and causing the query to fail telling me that the table does not exists.

I could easily go to all the mappings classes and change the Table method to be lowercase, like change from 'Table("UserAccount")' to 'Table("useraccount")' but I'd rather prefer not having to do this..

I was wondering if there is any way to tell nhibernate not to Double Quote the table on the queries so it'll find it correctly.

I tried with this:

PostgreSQLConfiguration.Standard.Raw("hbm2ddl.keywords","none").ConnectionString(x => x.Is(_connectionString));

and it did not work. I would pretty much tell nhibernate not to worry about case, but having trouble to do this with postgres.


You could change this behavior using Fluent NHibernate's IClassConvention. I guess here is no other way to do it according to this question

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜