I have the map shown below in one of my entities:
Code:
<map name="ResponsesSet" table="responses" lazy="true">
<key column="evaluationId"/>
<index type="string" column="varName"/>
<element type="StringClob" column="response" length="8096"/>
</map>
I really need the db that NHibernate creates from this mapping to have a clustered unique index created that includes the columns evaluationId and varName. This is simple to do in SQL Enterprise Manager after the db is created, but can NHibernate's mapping file express this so it's done automatically?
In general, I don't know how to get a unique constraint that includes more than one column. I know about <property name="..." unique="true"/>, but if I want the constraint to span more than one column, what can I do? I haven't been able to find this topic in the documentation.
Thanks in advance!