Skip to content
Snippets Groups Projects
Commit 6fbf0e7c authored by Matija Obreza's avatar Matija Obreza
Browse files

Fix: For large Inventory databases fetch is not a good idea

(cherry picked from commit 2cb66cd8)
parent 68e2cef8
No related branches found
Tags v2022.7.3
No related merge requests found
......@@ -122,7 +122,7 @@ public class InventoryRepositoryCustomImpl implements InventoryRepositoryCustom
// get total elements
// FIXME querydsl 5.0 supports fetchCount()
var totalElements = aggQuery.fetch().size();
var totalElements = aggQuery.fetchCount();
// apply pagination
aggQuery.offset(page.getOffset()).limit(page.getPageSize());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment