我试图实现this answer(实际上,Frank Tzanabetis的变体'使用ID而不是额外的列进行评论),但我不断获得The data types bigint and numeric are incompatible in the '&' operator.
数据类型我的ID是NUMERIC(18, 0)
。我已经尝试同时使用Int32
和Int64
种子来获得相同的结果。 ID的映射是通过* hbm.xml文件,它只包含名称和列:
<id name="MyId" column="MY_ID">
<generator class="assigned" />
</id>
对字段进行排序的位是a.MyId & seed
,其中a
是选择器中的参数。
谢谢!