mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-10-21 04:24:35 +00:00
* #3552 Column alias required for SQL Server + findCount + distinct - Modifies CQueryBuilder with the main fix which is to use the database platform selectCountWithColumnAlias for all distinct queries [and later disable it for single column case] - Modifies SqlTreeBuilder because we need to NOT use the column alias for the count distinct SINGLE COLUMN case. So change here to: - build the root SqlTreeNode first as part of constructor - use rootNode.isSingleProperty() to NOT use column alias for the single column case - Hence need to initialise DefaultDbSqlContext AFTER the root SqlTreeNode - Modifies DefaultDbSqlContext with no effective change, just columnIndex++ ONLY when we are actually using column alias - Modifies H2Platform to also use selectCountWithColumnAlias true * #3552 selectCountWithColumnAlias true for MariaDB and MySql Plus fix TestRowCount for Oracle platform