我目前在一个对象上有以下属性:
private IDictionary<ExampleKey,ExampleObject> example;ExampleKey在哪里
public class ExampleKey
{
public long KeyField1{ get; set;}
public long KeyField2{ get; set;}
}这与使用以下语法的hbm相对应:
<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>我正在尝试将所有内容更新为Fluent,但发现映射起来有困难。有谁知道做这件事的方法吗?
谢谢
Stu
发布于 2010-02-13 17:11:11
Fluent NHibernate还不支持复合索引。在获得支持之前,您必须一直使用XML。
https://stackoverflow.com/questions/2252474
复制相似问题