我有几个类使用NHibernate.Mapping.Attributes映射到非默认模式,如下所示:
[Class(Lazy = true, Schema = "NonDefaultSchemaName")]
public class Class1
我也有一些多对多的映射:
[Set(Inverse = false, Table = "Class1ToClass2", Lazy = true, Cascade = "none")]
[Key(1, Column = "Class1ID")]
[ManyToMany(2, ClassType = typeof(Class2), Column = "Class2ID")]
我想要实现的是将链接表Cass1ToClass2映射到
[NonDefaultSchemaName].[Class1ToClass2]
NHibernate会自动映射到默认架构。我找不到任何类似的谷歌搜索...
答案 0 :(得分:1)
了
[Set(Inverse = false, Table = "Class1ToClass2", Schema = "Schema", Lazy = true, Cascade = "none")]