【发布时间】:2011-05-23 07:58:08
【问题描述】:
我有一个类似于下面的表结构:
AttributeKey (ID, Title)
AttributeValue (ID, AttributeKeyID, Value)
我已经完成了所有映射设置,因此如果我查询 AttributeValue,它会使用引用连接到 AttributeKey (AttributeValue.AttributeKeyID = AttributeKey.ID),没问题……但是,我想查询 AttributeKey 表和 LEFT加入 AttributeValue 表,以便我获得所有 AttributeKeys 以及与它们相关的任何值......如何在流利的 nHibernate 中映射它?
本质上它与引用映射相反。
编辑:我知道 HasMany 方法与 References 相反,但使用它会引发我的属性未实现 UserCollectionType 的异常
干杯
【问题讨论】:
标签: nhibernate fluent-nhibernate