Wrong count by extbase with own QueryBuilder
I have created my own Query with QueryBuilder. As I need a relation to categories I have to prevent duplicates through LEFT JOIN. So I have added GROUP BY to my QueryBuilder and give it to $query->statement($myQueryBuilder).
If I call f:count() in fluid on result it should return 13, but it returns 1. That's because of a problem with COUNT and GROUP BY which results in:
This problem is known in extbase. It is solved with help of $suggestDistinctQuery in Typo3DbQueryParser. But in case of an own QueryBuilder object, this property keeps untouched.
I prefer to check own QueryBuilder objects for an existing GROUP BY and set suggestDistinctQuery to true.