You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using postgres as reference and it looks like gorm does not format properly count if Distinct is called with more than one argument before it. I've tried manually inserting the raw sql with count(distinct(arg1, arg2, ...)) and it seems to work fine the database. gorm defaults to count(*) instead and uses distinct only in the Find query. I expect both of them to have distinct.
GORM Playground Link
go-gorm/playground#683
Description
I'm using postgres as reference and it looks like gorm does not format properly
count
ifDistinct
is called with more than one argument before it. I've tried manually inserting the raw sql withcount(distinct(arg1, arg2, ...))
and it seems to work fine the database. gorm defaults tocount(*)
instead and uses distinct only in theFind
query. I expect both of them to have distinct.Related issue but not quite the same: #6790
The text was updated successfully, but these errors were encountered: