2011-09-07 137 views
0

1)为什么SchemaMetadataUpdater.QuoteTableAndColumns不更新(scape)模式名称?我如何更新模式?我有一个保留模式的问题,因为关键字是MsSql,如'Statistics'。但是,这可以通过使用'[Statistics]'来解决。FluentNHibernate:映射问题

2)如何根据特定条件覆盖ManyToMany关系的默认模式;不是全局默认模式?

UPDATE

2.1)在定义用户和角色之间的多对多关系,自动地被NHibernate的用于处理这种关系人员产生的UserRole表。现在我们可以轻松地更改角色和用户表的模式,但我们无法访问UserRole,因此我们无法为其指定模式。我的问题是如何改变这种类型的表的模式?

感谢的

回答

1

在基础XML映射NHibernate的,你会逃避与`(grave accent - the other character on the tilda key (~) below the esc key) this is the native escape >character for nhibernate and translates it to the correct escape character for the database dialect you are using. so nhibernate will traslate`Statistics``表/列名[统计]为MSSQL

2)可以请你扩大。因为你不清楚你在做什么。

对于格式化感到抱歉。减价正在与严重的重音密钥混战。

+0

感谢Nathan的回答。对于我的问题的第二部分阅读这篇文章后http://wiki.fluentnhibernate.org/Available_conventions我已经解决了我的问题很容易购买使用IJoinedSubclassConvention,IHasManyToManyConvention和改变模式。 – Sadegh