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.',