Skip to content

Commit 19b15a1

Browse files
committed
Fix parameter index in getCount function.
1 parent fe83a85 commit 19b15a1

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

framework/db/src/com/cloud/utils/db/GenericDaoBase.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1878,10 +1878,10 @@ public Integer getCount(SearchCriteria<T> sc) {
18781878
PreparedStatement pstmt = null;
18791879
try {
18801880
pstmt = txn.prepareAutoCloseStatement(sql);
1881-
int i = 0;
1881+
int i = 1;
18821882
if (clause != null) {
18831883
for (final Pair<Attribute, Object> value : sc.getValues()) {
1884-
prepareAttribute(++i, pstmt, value.first(), value.second());
1884+
prepareAttribute(i++, pstmt, value.first(), value.second());
18851885
}
18861886
}
18871887

0 commit comments

Comments
 (0)