#30083: Model instance state not correctly set when initializing a model with
Model.from_db()
-------------------------------------+-------------------------------------
     Reporter:  Sebastiaan ten Pas   |                    Owner:  Nasir
                                     |  Hussain
         Type:  Bug                  |                   Status:  closed
    Component:  Database layer       |                  Version:  2.1
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:  wontfix
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by felixxm):

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


Comment:

 When we take into account performance doubts, `__new__()` tricky,
 additional complexity, and that we can encourage bad practices to perform
 queries in receivers of `pre_init` or `post_init` signals (hidden N+1
 queries on every queryset iteration), I think we shouldn't fix this (see
 also [https://code.djangoproject.com/ticket/18532#comment:5 Anssi's
 comment] and [https://code.djangoproject.com/ticket/30083#comment:4
 Simon's comment]). It's just not worth it. I'm going to add notes to the
 signal documentation.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/30083#comment:6>
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 post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.b8e02e42d057674cdc52d3a110432d9b%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to