diff --git a/src/main/java/org/gcube/accounting/analytics/persistence/postgresql/AccountingPersistenceQueryPostgreSQL.java b/src/main/java/org/gcube/accounting/analytics/persistence/postgresql/AccountingPersistenceQueryPostgreSQL.java index f424b78..76354e2 100644 --- a/src/main/java/org/gcube/accounting/analytics/persistence/postgresql/AccountingPersistenceQueryPostgreSQL.java +++ b/src/main/java/org/gcube/accounting/analytics/persistence/postgresql/AccountingPersistenceQueryPostgreSQL.java @@ -215,7 +215,7 @@ public class AccountingPersistenceQueryPostgreSQL implements AccountingPersisten orderingProperty = AccountingPersistenceQuery.getDefaultOrderingProperties(clz); } - if(limit<1) { + if(limit!= null && limit<1) { limit = DEFAULT_TOP_LIMIT; }