Update for compatibility with MySQL 5.7+ and PostgreSQL
getUniqueResources, getUniqueTags, and getUniqueUsers was failing due to mySQL5.7 compatibility issues. The error being thrown by mySQL was: Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by To fix, we have to either turn off the only_full_group_by option or specifically select the columns that are used instead of selecting *. See: https://dev.mysql.com/doc/refman/5.7/en/group-by-handling.html for more info. PostgreSQL was failing due to fields being present in ORDER but missing from GROUP BY. This has also been corrected.
Please register or sign in to comment