MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / identity_key

Method identity_key

lib/sqlalchemy/orm/state.py:429–438  ·  view source on GitHub ↗

Return the identity key for the mapped object. This is the key used to locate the object within the :attr:`.Session.identity_map` mapping. It contains the identity as returned by :attr:`.identity` within it.

(self)

Source from the content-addressed store, hash-verified

427
428 @property
429 def identity_key(self) -> Optional[_IdentityKeyType[_O]]:
430 """Return the identity key for the mapped object.
431
432 This is the key used to locate the object within
433 the :attr:`.Session.identity_map` mapping. It contains
434 the identity as returned by :attr:`.identity` within it.
435
436
437 """
438 return self.key
439
440 @util.memoized_property
441 def parents(self) -> Dict[int, Union[Literal[False], InstanceState[Any]]]:

Callers 8

scoped_session.pyFile · 0.45
test_identity_key_1Method · 0.45
test_identity_key_2Method · 0.45
test_identity_key_3Method · 0.45

Calls

no outgoing calls

Tested by 6

test_identity_key_1Method · 0.36
test_identity_key_2Method · 0.36
test_identity_key_3Method · 0.36