Skip to content

Commit 33c09f4

Browse files
npotierwgmv
andauthored
Feature/wgmv updates dql function documentation (#1084)
* Update dql_function.md (#1044) * indentation --------- Co-authored-by: Walter Vogel <walter@wgmv.de>
1 parent 6727d1e commit 33c09f4

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

Resources/doc/columns_configuration/annotations/dql_function.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,3 +103,15 @@ class Article {
103103
`sales.name:otherFunction:string` turns into `otherFunction(_sales.name, 'string')` in DQL
104104

105105
`other:count:distinct` turns into `count(DISTINCT _a.other)` in DQL
106+
107+
108+
## Using GridBuilder
109+
```php
110+
<?php
111+
...
112+
/* Example BlogPost has many Comments */
113+
/** @var GridBuilder $builder */
114+
$builder
115+
->setGroupBy('id') //important to setGroupBy otherwise the column will not aggregate
116+
->add('comments.id:count', 'text' ['title' => 'Number of Comments']);
117+
```

0 commit comments

Comments
 (0)