#30991: Optional removal of transaction and extra `get()` in `get_or_create`.
-------------------------------------+-------------------------------------
     Reporter:  Michael Korobov      |                    Owner:  nobody
         Type:  New feature          |                   Status:  closed
    Component:  Database layer       |                  Version:  master
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:  wontfix
     Keywords:  get_or_create        |             Triage Stage:
                                     |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by felixxm):

 * status:  new => closed
 * resolution:   => wontfix
 * version:  2.2 => master
 * type:  Cleanup/optimization => New feature


Comment:

 Thanks for this ticket, however this use case is quite niche, IMO. I don't
 think that we want to encourage users for such "unsafe" behavior.
 `get_or_create()` is a sensitive method with few warnings (see
 [https://docs.djangoproject.com/en/2.2/ref/models/querysets/#get-or-create
 documentation]) we shouldn't make it more complicated. Moreover you should
 be able to easily add such hook to your app.

 You can start a discussion on the DevelopersMailingList if you don't
 agree.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/30991#comment:2>
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 django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.d1290cd29cf146c3887ac2d70fca08bc%40djangoproject.com.

Reply via email to