#36218: allow annotate to override model's fields
-------------------------------------+-------------------------------------
Reporter: Jan Napieralski | Owner: (none)
Type: New feature | Status: closed
Component: Database layer | Version: 5.1
(models, ORM) |
Severity: Normal | Resolution: wontfix
Keywords: QuerySet.extra | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by David Sanders):
* resolution: => wontfix
* status: new => closed
Comment:
Hi there, thanks for the idea though I believe (iirc) the original reason
this was prevented was to avoid accidental data loss when saving the
model.
I can't find the original thread discussing this but I did write up about
this here: https://github.com/shangxiao/stupid-django-
tricks/tree/master/annotation_overwrite
If this hack is unsuitable for you then I'd encourage you to start a
thread on the Django Forum, https://forum.djangoproject.com/, to discuss
the issue (any feature requests & proposals must get approval via the
forum first). It's unlikely to be accepted but there may be other folks
with other workarounds that may be your cup of tea 😉
--
Ticket URL: <https://code.djangoproject.com/ticket/36218#comment:1>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/django-updates/010701954c9438a9-decc7b16-e2ac-4bae-9ad5-ef9fb1e357a5-000000%40eu-central-1.amazonses.com.