Replace COUNT(DISTINCT primary_key) with COUNT(*)
This commit is contained in:
@@ -40,7 +40,6 @@ func NewMediaFileRepository(ctx context.Context, o orm.QueryExecutor) *mediaFile
|
||||
|
||||
func (r *mediaFileRepository) CountAll(options ...model.QueryOptions) (int64, error) {
|
||||
sql := r.newSelectWithAnnotation("media_file.id")
|
||||
sql = r.withGenres(sql)
|
||||
return r.count(sql, options...)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user