wrong working method findAndCountAll(), when have include models and distinct: true #10137
Labels
status: awaiting response
For issues and PRs. OP must respond (or change something, if it is a PR). Maintainers have no action
topic: count
For issues and PRs. Things that involve counting such as the `count` and the `findAndCountAll` meth.
type: bug
What are you doing?
when I use
distinct: true
property, I have an error:syntax error at or near "*"
, request:SELECT count(DISTINCT(*)) AS "count" <...>
I found error on the
model.js
file (https://github.com/sequelize/sequelize/blob/v4/lib/model.js#L1841):In the console I got next value:
count options: { hooks: true }
, as you can see there is no include valueDialect: postgres
Sequelize version: 4.41.0
The text was updated successfully, but these errors were encountered: