使用组件作为功能NHibernate的IDictionary指数AsMap [英] Use Component as IDictionary index in AsMap in Fluent Nhibernate
本文介绍了使用组件作为功能NHibernate的IDictionary指数AsMap的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我现在有一个对象的下列财产:
I currently have the following property on an object:
private IDictionary<ExampleKey,ExampleObject> example;
其中ExampleKey为
where ExampleKey is
public class ExampleKey
{
public long KeyField1{ get; set;}
public long KeyField2{ get; set;}
}
这地图有以下语法HBM:
This maps with hbm with the following syntax:
<map name="example" inverse="true" cascade="all-delete-orphan">
<key column="OwningClassID"/>
<composite-index class="ExampleKey">
<key-property type="long" name="KeyField1" column="Key1ID" access="property"/>
<key-property type="long" name="KeyField2" column="Key2ID" access="property" />
</composite-index>
<one-to-many class="ExampleObject" />
</map>
我试图更新一切与此映射流利,发现困难。有谁知道这个干什么?
I'm trying to update everything to Fluent and found difficulties with mapping this. Does anyone know of any way of doing this?
感谢
斯图
推荐答案
综合指数。你必须留在XML直到支撑在那里。
Composite-index isn't supported in Fluent NHibernate yet. You'll have to stay with XML until the support is in there.
这篇关于使用组件作为功能NHibernate的IDictionary指数AsMap的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文