我想为 xml 文件上的集合的多列仅创建一个索引或复合索引。有正确的方法吗?我找不到任何相关的东西。我发现在sql上这是可能的。
这是我的例子;
<set name="properties" fetch="join" lazy="false" table="PLN_DEMAND_ORDER_ITM_PROPERTY">
<key>
<column name="ORDER_ID" index="IDX_PLN_DOIP_ORDER_ID"/> <=
<column name="LINE_NO" index="IDX_PLN_DOIP_ORDER_ID"/> <= for both column only one index is needed
</key>
.
.
.
</set>
最佳答案
Multiple columns can be grouped by simply **specifying the same index name** into the same index as you have clearly done it.
这个link可以给你更好的理解。希望这有帮助..
关于java - 是否可以为多个列创建一个索引? hibernate ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26464997/