From 5908de3c1cd55a01d526aa8d1f4533a97f5dbf00 Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Thu, 19 Jun 2025 19:11:47 +0300 Subject: [PATCH] select only id --- application/Espo/Classes/Jobs/Cleanup.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/application/Espo/Classes/Jobs/Cleanup.php b/application/Espo/Classes/Jobs/Cleanup.php index 78bb2c07df..fd40529b77 100644 --- a/application/Espo/Classes/Jobs/Cleanup.php +++ b/application/Espo/Classes/Jobs/Cleanup.php @@ -406,7 +406,7 @@ class Cleanup implements JobDataLess $query = $this->entityManager ->getQueryBuilder() - ->select() + ->select(['id']) ->from($scope) ->withDeleted() ->where([ @@ -416,12 +416,12 @@ class Cleanup implements JobDataLess ]) ->build(); - $deletedEntityList = $repository + $deletedEntities = $repository ->clone($query) ->sth() ->find(); - foreach ($deletedEntityList as $deletedEntity) { + foreach ($deletedEntities as $deletedEntity) { $attachmentToRemoveList = $this->entityManager ->getRDBRepository(Attachment::ENTITY_TYPE) ->sth()