Query hints & persistent cache for latest approvals (#5176)

This commit is contained in:
Kevin Papst
2024-11-25 21:04:53 +01:00
committed by GitHub
parent 46c4449504
commit f13b81ede7
11 changed files with 162 additions and 81 deletions

View File

@@ -84,7 +84,7 @@ final class TimesheetResult
/** @var array<Timesheet> $results */
$results = $this->query->getResult();
$loader = new TimesheetLoader($this->entityManager, true);
$loader = new TimesheetLoader($this->entityManager, $this->timesheetQuery);
$loader->loadResults($results);
$this->resultCache = $results;
@@ -95,7 +95,7 @@ final class TimesheetResult
public function getPagerfanta(): Pagination
{
$loader = new LoaderQueryPaginator(new TimesheetLoader($this->entityManager), $this->query, $this->getStatistic()->getCount());
$loader = new LoaderQueryPaginator(new TimesheetLoader($this->entityManager, $this->timesheetQuery), $this->query, $this->getStatistic()->getCount());
$paginator = new Pagination($loader);
$paginator->setMaxPerPage($this->timesheetQuery->getPageSize());