How to create clustered index on multiple columns using hibernate

I have 2 non clustered index, one on column A and one on column B. I want to edit the .hbm.xml file to remove these index and create one clustered index on the combination of Column A and B. What would be the attribute to use in the hbm.xml file? I donot want to use annotations in the persisting java file, since the existing code will have to be modified. Please guide me in this regard.

Upvotes: 0

Views: 2323

Answers (1)

nrph
nrph

Reputation: 335

Multiple columns can be grouped into the same index by simply specifying the same index name.

<property name="columnA" index="CustName"/>
<property name="columnB" index="CustName"/>

Upvotes: 2

Related Questions