gpt4 book ai didi

java - 是否可以为多个列创建一个索引? hibernate

转载 作者:太空宇宙 更新时间:2023-11-04 14:27:57 25 4
gpt4 key购买 nike

我想为 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/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com