I have a simple mapping file:
<class name="Comment">
<id name="ID" generator="increment" />
<property name="KnowledgeID" />
</class>
where "KnowledgeID" is a foreign key to another table. I would like this to be indexed for performance reasons. I know that I can create an index in SQL Server Management Studio and linking it through its name:
<property name="KnowledgeID" index="IX_KnowledgeComment_ID" />
but I was wondering if I can reach the same goal through nHibernate configuration.
So, what's a good standard practice in defining indexes for nHibernate-generated tables?