views:

288

answers:

1

I currently have the following property on an object:

private IDictionary<ExampleKey,ExampleObject> example;

where ExampleKey is

public class ExampleKey
{
    public long KeyField1{ get; set;}
    public long KeyField2{ get; set;}
}

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?

Thanks

Stu

+2  A: 

Composite-index isn't supported in Fluent NHibernate yet. You'll have to stay with XML until the support is in there.

Paul Batum
OK, thanks Paul, shame. Do you know if there a plan to add it or should I create a feature request.CheersStu
Stu
No real plans for it to be added, so submitting an enhancement request on our issues list for it would not be a bad idea.
Paul Batum