Closed
Description
Migrated issue, originally created by Michael Bayer (@zzzeek)
we deprecated with_lockmode() in 0.9 but session.refresh() still codes to it. linking refresh() to with_for_update() might be awkward due to the flags, probably have a dictionary passed in using kw argument with_for_update.
however, awkward to say session.refresh(obj, with_for_update={})
and that means FOR UPDATE since empty dict implies boolean false.
Metadata
Metadata
Assignees
Labels
Type
Projects
Relationships
Development
No branches or pull requests
Activity
sqlalchemy-bot commentedon May 15, 2017
Michael Bayer (@zzzeek) wrote:
https://gerrit.sqlalchemy.org/403
sqlalchemy-bot commentedon May 24, 2017
Michael Bayer (@zzzeek) wrote:
Add with_for_update() support in session.refresh()
Session.refresh() is still hardcoded to legacy lockmode,
come up with a new API so that the newer argument style
works with it.
Added new argument :paramref:
.with_for_update
to the:meth:
.Session.refresh
method. When the :meth:.Query.with_lockmode
method were deprecated in favor of :meth:
.Query.with_for_update
,the :meth:
.Session.refresh
method was never updated to reflectthe new option.
Change-Id: Ia02a653746b7024699b515451525a88d7a17d63a
Fixes: #3991
→ de11c52
sqlalchemy-bot commentedon May 24, 2017
Changes by Michael Bayer (@zzzeek):