Open reality95 opened 10 months ago
I expect count to be equal to len(result), instead if you look at the debug logger, the distinct operation is dropped altogether for count if more than a column is provided. One single column works fine as in the documentation:
count
len(result)
db.Model(&User{}).Distinct("name").Count(&count)
Explain your user case and expected results
I expect
count
to be equal tolen(result)
, instead if you look at the debug logger, the distinct operation is dropped altogether for count if more than a column is provided. One single column works fine as in the documentation: