MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / reset_for_lazy_callable

Method reset_for_lazy_callable

lib/sqlalchemy/orm/strategies.py:1234–1243  ·  view source on GitHub ↗
(state, dict_, row)

Source from the content-addressed store, hash-verified

1232 elif context.populate_existing or mapper.always_refresh:
1233
1234 def reset_for_lazy_callable(state, dict_, row):
1235 # we are the primary manager for this attribute on
1236 # this class - reset its
1237 # per-instance attribute state, so that the class-level
1238 # lazy loader is
1239 # executed when next referenced on this instance.
1240 # this is needed in
1241 # populate_existing() types of scenarios to reset
1242 # any existing state.
1243 state._reset(dict_, key)
1244
1245 populators["new"].append((self.key, reset_for_lazy_callable))
1246

Callers

nothing calls this directly

Calls 1

_resetMethod · 0.45

Tested by

no test coverage detected