开发者

NHibernate - create a complex index from hbm file

I am creating my tables and indexes from the NHibernate mappings.

For example, I create the LastName index as follows:

  <property name="LastName" column="LastName" type开发者_如何学编程="String" length="50"  not-null="true" index="IDX_Patient_Lastname"/>

I would like to create a complex index, so that for example LastName and FirstName are generated as one index. Is this possible in NHibernate?


Assign same index name to FirstName :

<property name="LastName" column="LastName" type="String" length="50"  not-null="true" index="IDX_Patient_Lastname"/>
<property name="FirstName" column="FirstName" type="String" length="50"  not-null="true" index="IDX_Patient_Lastname"/>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜