Java文档
int getRow() throws SQLException
Retrieves the current row number. The first row is number 1, the second number 2, and so on.
Hibernate 中有类似 getRow()
的东西吗?
<强> Reference
最佳答案
Is there anything similar to getRow() in Hibernate?
是的,你可以使用 Hibernate ScrollableResults 和 .getRowNumber()方法从结果中返回当前行号。
getRowNumber() throws HibernateException
Get the current location in the result set. The first row is number 0, contrary to JDBC.
注意:
请记住,区别在于 hibernate 结果集中的行号从 0 开始。
关于java - 相当于Hibernate中的ResultSet.getRow(),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30210326/