MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / ensure_no_pk

Function ensure_no_pk

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

Source from the content-addressed store, hash-verified

1236 # if we are doing polymorphic, dispatch to a different _instance()
1237 # method specific to the subclass mapper
1238 def ensure_no_pk(row):
1239 identitykey = (
1240 identity_class,
1241 primary_key_getter(row),
1242 identity_token,
1243 )
1244 if not is_not_primary_key(identitykey[1]):
1245 return identitykey
1246 else:
1247 return None
1248
1249 _instance = _decorate_polymorphic_switch(
1250 _instance,

Callers 1

polymorphic_instanceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected