From 27d4e2d8b9e8a6ae2371f30fbb70df02b049007a Mon Sep 17 00:00:00 2001 From: Guillaume Date: Tue, 1 Dec 2020 16:16:07 +0100 Subject: [PATCH] findObjectByPk: Add `className` to avoid using schema inspection during runtime --- src/Utils/BeanDescriptor.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Utils/BeanDescriptor.php b/src/Utils/BeanDescriptor.php index b66605cf..98c84fd0 100644 --- a/src/Utils/BeanDescriptor.php +++ b/src/Utils/BeanDescriptor.php @@ -886,7 +886,7 @@ public function generateDaoPhpCode(): ?FileGenerator 'getById', $parameters, MethodGenerator::FLAG_PUBLIC, - "return \$this->tdbmService->findObjectByPk('$tableName', [" . implode(', ', $primaryKeyFilter) . "], [], \$$lazyLoadingParameterName);", + "return \$this->tdbmService->findObjectByPk('$tableName', [" . implode(', ', $primaryKeyFilter) . "], [], \$$lazyLoadingParameterName, '\\$beanClassName');", (new DocBlockGenerator( "Get $beanClassWithoutNameSpace specified by its ID (its primary key).", 'If the primary key does not exist, an exception is thrown.',