生成代码如下:
Gorm 同样一份SQL,代码生成出来会报错,但是手动复制生成的SQL用Raw执行就正常 错误信息: Error 1055: Expression #4 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'gtest_hyxc.t_evaluation.name' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by


直接执行效果如下:
Gorm 同样一份SQL,代码生成出来会报错,但是手动复制生成的SQL用Raw执行就正常

Comment From: github-actions[bot]

The issue has been automatically marked as stale as it missing playground pull request link, which is important to help others understand your issue effectively and make sure the issue hasn't been fixed on latest master, checkout https://github.com/go-gorm/playground for details. it will be closed in 30 days if no further activity occurs. if you are asking question, please use the Question template, most likely your question already answered https://github.com/go-gorm/gorm/issues or described in the document https://gorm.io ✨ Search Before Asking

Comment From: lixh00

只贴了直接运行的图,使用gorm调用Raw的图没贴,但是效果是一致的

Comment From: github-actions[bot]

The issue has been automatically marked as stale as it missing playground pull request link, which is important to help others understand your issue effectively and make sure the issue hasn't been fixed on latest master, checkout https://github.com/go-gorm/playground for details. it will be closed in 30 days if no further activity occurs. if you are asking question, please use the Question template, most likely your question already answered https://github.com/go-gorm/gorm/issues or described in the document https://gorm.io ✨ Search Before Asking

Comment From: crazygit

今天遇到一样的现象了,不晓得是不是日志里打印的SQL和实际执行的SQL语句不一样导致的