Replies: 2 comments 2 replies
-
Hi @j4mie -- I've looked at this several times... I'd say it's marginal but over the life of the project it's probably better to be consistent with the ORM behaviour, that being "expected". |
Beta Was this translation helpful? Give feedback.
2 replies
-
Decision: this has now been done in #56 and will be released in version 2.0 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The
distinct
argument to anyAggregate
subclass (Count
,Sum
,Avg
etc) in the ORM defaults toFalse
:However, in our
pairs.count
andpairs.has
shortcuts, we override the default to beTrue
:This was done because the
DISTINCT
version is arguably less surprising and gives the correct answer more of the time, ie it usually expresses what the developer intended, especially when multiple aggregations are combined.However, to a developer who already knows how these aggregates work in Django, it's probably much more surprising that the defaults are reversed in
django-readers
.So: should we change the default here and bring
django-readers
back into alignment with Django itself? This would also simplify the implementation ofpairs.count
etc (see #56). However, it would be a backwards-incompatible change and would therefore require a major version bump 😬Beta Was this translation helpful? Give feedback.
All reactions