#34962: Support for overriding result of model field values
-------------------------------------+-------------------------------------
     Reporter:  piraka9011           |                    Owner:  nobody
         Type:  New feature          |                   Status:  closed
    Component:  Database layer       |                  Version:  4.2
  (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):

 * status:  new => closed
 * resolution:   => wontfix


Comment:

 Thanks for the request but this was an intentional change to prevent data
 loss.

 You can either setup a new annotation get DRF to refer to that (it's quite
 easy by specifying the `source` kwarg for that field in the model
 serializer's `extra_kwargs`) or you'll need to manually manipulate the
 query underneath the queryset eg: https://github.com/shangxiao/stupid-
 django-tricks/tree/master/annotation_overwrite  (Standard disclaimer
 applies here as that's not an official Django recommendation).

 Good luck!

-- 
Ticket URL: <https://code.djangoproject.com/ticket/34962#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 on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018bb472e4ff-124bd5af-d9f3-4243-b162-bb2ffbe1e766-000000%40eu-central-1.amazonses.com.

Reply via email to