MCPcopy Create free account
hub / github.com/sqlalchemy/sqlalchemy / ensure_no_pk

Function ensure_no_pk

lib/sqlalchemy/orm/loading.py:1231–1240  ·  view source on GitHub ↗
(row)

Source from the content-addressed store, hash-verified

1229 # if we are doing polymorphic, dispatch to a different _instance()
1230 # method specific to the subclass mapper
1231 def ensure_no_pk(row):
1232 identitykey = (
1233 identity_class,
1234 primary_key_getter(row),
1235 identity_token,
1236 )
1237 if not is_not_primary_key(identitykey[1]):
1238 return identitykey
1239 else:
1240 return None
1241
1242 _instance = _decorate_polymorphic_switch(
1243 _instance,

Callers 1

polymorphic_instanceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected