const ID usage

This commit is contained in:
Yuri Kuznetsov
2024-11-11 17:41:22 +02:00
parent 0531b7239c
commit 6d1c4d2aa8
85 changed files with 252 additions and 173 deletions
@@ -35,6 +35,7 @@ use Espo\Entities\Email;
use Espo\Entities\EmailFolder;
use Espo\ORM\Entity;
use Espo\ORM\EntityManager;
use Espo\ORM\Name\Attribute;
/**
* @implements Loader<Email>
@@ -53,8 +54,8 @@ class FolderDataLoader implements Loader
$folder = $this->entityManager
->getRDBRepositoryByClass(EmailFolder::class)
->select(['id', 'name'])
->where(['id' => $folderId])
->select([Attribute::ID, 'name'])
->where([Attribute::ID => $folderId])
->findOne();
if (!$folder) {