Closed
Description
#1495 - released in 3.2.1 forces every model in a project to have a default ordering specified.
The impact of this is not trivial:
- Each project using this will have to set ordering defaults on every model that a DjangoConnectionField is being applied to (in only one of my projects this is over 100 changes)
- Ordering is not a free operation (please see https://docs.djangoproject.com/en/5.0/ref/models/options/#ordering)
I do agree the problem raised in #1495 is a good catch, but I think a better approach to handling this could be:
- If there is no default ordering specified, use the models primary key as the default for sorting, since every model should have one (https://docs.djangoproject.com/en/5.0/topics/db/models/#automatic-primary-key-fields) and/or
- Warn the user of potential problems rather than enforcing model updates
Please feel free to disagree with me if I'm misunderstanding or overlooking something here, in the meantime I'm pinning to 3.2.0 😊