limit null means unlimited

This commit is contained in:
Luca Frosini 2021-11-25 16:59:33 +01:00
parent a39ffc0eab
commit 08f3175380
2 changed files with 2 additions and 4 deletions

View File

@ -215,7 +215,7 @@ public class AccountingPersistenceQueryPostgreSQL implements AccountingPersisten
orderingProperty = AccountingPersistenceQuery.getDefaultOrderingProperties(clz);
}
if(limit == null || limit<1 || limit >50) {
if(limit<1 || limit >50) {
limit = MAX_TOP_LIMIT;
}

View File

@ -317,11 +317,9 @@ public class Query extends PostgreSQLQuery {
}
protected void addLimit() {
stringBuffer.append(" LIMIT ");
if(limit != null) {
stringBuffer.append(" LIMIT ");
stringBuffer.append(limit.toString());
}else {
stringBuffer.append(50);
}
}