From cb1ea7b2828d46f314c3a6f62a31694e327e75f9 Mon Sep 17 00:00:00 2001 From: Carl Schwan Date: Fri, 23 Jan 2026 17:53:27 +0100 Subject: [PATCH] fix(developer_manual/database): Port away from createFunction This function is a bit harder to use correctly than IFunctionBuilder, so use IFunctionBuilder instead. Signed-off-by: Carl Schwan --- developer_manual/basics/storage/database.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/developer_manual/basics/storage/database.rst b/developer_manual/basics/storage/database.rst index f7c174566f2..01f909e0bd2 100644 --- a/developer_manual/basics/storage/database.rst +++ b/developer_manual/basics/storage/database.rst @@ -177,7 +177,7 @@ To create a mapper, inherit from the mapper base class and call the parent const public function authorNameCount($name) { $qb = $this->db->getQueryBuilder(); - $qb->selectAlias($qb->createFunction('COUNT(*)'), 'count') + $qb->select($qb->func()->count('*', 'count')) ->from('myapp_authors') ->where( $qb->expr()->eq('name', $qb->createNamedParameter($name, IQueryBuilder::PARAM_STR))