tractorcow-farm / silverstripe-fluent

Multi-language translate module for Silverstripe, without having to manage separate site trees.
BSD 3-Clause "New" or "Revised" License
94 stars 111 forks source link

MSSQL database doesn't allow aliases in GROUP BY #813

Open t3hn0 opened 1 year ago

t3hn0 commented 1 year ago

This part of code is preventing SS5 to be run on MSSQL database.

Logical Query Processing in MSSQL is:

  1. FROM
  2. ON
  3. JOIN
  4. WHERE
  5. GROUP BY
  6. WITH CUBE/ROLLUP
  7. HAVING
  8. SELECT
  9. DISTINCT
  10. ORDER BY
  11. TOP
  12. OFFSET/FETCH

Since original SQL only returns prettier variable name it shouldn't do any harm.

Tested on SS5 with MSSQL and SS5 with MySQL.

Fixed in PR#812

tractorcow commented 1 year ago

Approved PR at https://github.com/tractorcow-farm/silverstripe-fluent/pull/812. Can merge once build is passed.