From 33c09f4e56d9a9472e1eb231ec9a7c6bf33f75d9 Mon Sep 17 00:00:00 2001 From: Nicolas Potier Date: Sat, 11 Feb 2023 13:32:36 -0300 Subject: [PATCH] Feature/wgmv updates dql function documentation (#1084) * Update dql_function.md (#1044) * indentation --------- Co-authored-by: Walter Vogel --- .../annotations/dql_function.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Resources/doc/columns_configuration/annotations/dql_function.md b/Resources/doc/columns_configuration/annotations/dql_function.md index 0705b66d..48e539e1 100644 --- a/Resources/doc/columns_configuration/annotations/dql_function.md +++ b/Resources/doc/columns_configuration/annotations/dql_function.md @@ -103,3 +103,15 @@ class Article { `sales.name:otherFunction:string` turns into `otherFunction(_sales.name, 'string')` in DQL `other:count:distinct` turns into `count(DISTINCT _a.other)` in DQL + + +## Using GridBuilder +```php +setGroupBy('id') //important to setGroupBy otherwise the column will not aggregate + ->add('comments.id:count', 'text' ['title' => 'Number of Comments']); +```