I’ve seen answers for unique keys, primary keys… but nothing for a plain old composite (not unique) index definition using Fluent NHibernate.
I have:
public class ObjectPropertyMapping:ClassMap<ObjectProperty>
{
public ObjectPropertyMapping()
{
Table("ObjectProperties");
Id(x => x.ObjectPropertyID);
References(x => x.Object);
Map(x => x.Name);
Map(x => x.Scale);
Map(x => x.Precision);
Map(x => x.Type);
Map(x => x.Value);
}
}
and I want to make a composite index on Object.ObjectID and Name. How do I do that?
I haven’t tried this but I would assume you would do something like this: