egg-sequelize使用group by的时候查询报SequelizeDatabaseError,但拿SQL到数据库执行能正常返回值

wbrvyc0a  于 5个月前  发布在  其他
关注(0)|答案(2)|浏览(87)

What happens?

A clear and concise description of what the bug is.
SQL如下,其中 team_id是主键,
SELECT team_id , team_name , thumbnail , introduce , COUNT( team . father_id ) AS count FROM team AS team WHERE team . father_id = 0 GROUP BY father_id HAVING father_id = 0 LIMIT 0, 15;

Mini Showcase Repository(REQUIRED)

Provide a mini GitHub repository which can reproduce the issue.
Use npm init egg --type=simple bug then upload to your GitHub

How To Reproduce

Steps to reproduce the behavior:
1.
2.

Expected behavior
1.
2.

Context

  • Node Version:
  • Egg Version:
  • Plugin Name:
  • Plugin Version:
  • Platform:
t5fffqht

t5fffqht1#

一般来说,这属于 sequelize 的问题,可以去对应的社区查查或 google 看看

xvw2m8pv

xvw2m8pv2#

请给出具体的错误堆栈信息

相关问题