FIX: Some jdbc drivers don't like absolute(0), even though this is

allowed.  As such, call beforeFirst() instead.  Technically, these
broken jdbc drivers should have the same kind of work-around.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1417210 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Adam Heath
2012-12-04 21:54:28 +00:00
parent 1d8613008b
commit fc81ed5fb1
@@ -211,7 +211,12 @@ public class EntityListIterator implements ListIterator<GenericValue> {
if (closed) throw new GenericResultSetClosedException("This EntityListIterator has been closed, this operation cannot be performed");
try {
return resultSet.absolute(rowNum);
if (rowNum == 0) {
resultSet.beforeFirst();
return true;
} else {
return resultSet.absolute(rowNum);
}
} catch (SQLException e) {
if (!closed) {
this.close();