我们有一个应用程序,我们使用表排序。每次我们反弹服务器时,表中的序列号(这里是 SEQ_R)表现得很奇怪。序列号增加 90000,有时增加 50。其中,增量应该是 1。
我不得不提到我们使用 MSSQl 服务器。
在我们的 session.xml 中
<sequencing>
<default-sequence xsi:type = "table-sequence">
<name> Custom </name>
<preallocation-size> 80000 </preallocation-size>
<table> SEQ </table>
<name-field> SEQ_N </name-field>
<counter-field> SEQ_R </counter-field>
</default-sequencing>
</sequencing>
在我们的 mappings.xml
<toplink:sequencing>
<toplink:default-sequence xsi:type = "toplink:native">
<toplink:preallocation-size> 80000 </toplink:preallocation-size>
</toplink:default-sequence>
</toplink:sequencing>