#28344: Add for_update parameter to Model.refresh_from_db()
-------------------------------------+-------------------------------------
Reporter: Patryk Zawadzki | Owner: (none)
Type: New feature | Status: new
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Hugo Osvaldo Barrera):
If the transaction is written as I did in my example, you don't need to
call `refresh_from_db`, since you only ever keep the reference to one
loaded instance.
I guess that saving when exiting the context manager would solve any
doubts.
--
Ticket URL: <https://code.djangoproject.com/ticket/28344#comment:8>
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/064.537328b3008fb423b620ae3c9164c68b%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.