nette / database

💾 A database layer with a familiar PDO-like API but much more powerful. Building queries, advanced joins, drivers for MySQL, PostgreSQL, SQLite, MS SQL Server and Oracle.
https://doc.nette.org/database
Other
502 stars 107 forks source link

Fixed aggregations when group by and having conditions are used #284

Closed MartinMystikJonas closed 2 years ago

MartinMystikJonas commented 2 years ago

This fixes wrong results of aggregate functions applied on selection with group and having conditions. Previously aggregate of all rows even that not matching having conditions were returned.

MartinMystikJonas commented 2 years ago

Related: https://github.com/nette/database/issues/283

MartinMystikJonas commented 2 years ago

We would need this also in 3.0 and 2.4 branches (old project we do not have time to upgrade yet). Should I prepare separate PRs or will you just apply this changes to older branches too?

dg commented 2 years ago

You don't have to. I'll backport it myself.

MartinMystikJonas commented 2 years ago

You don't have to. I'll backport it myself.

Thanks