开发者

NHibernate - create a complex index from hbm file

开发者 https://www.devze.com 2023-02-24 02:10 出处:网络
I am creating my tables and indexes from the NHibernate mappings. For example, I create the LastName index as follows:

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

精彩评论

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