MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / has_identity

Method has_identity

lib/sqlalchemy/orm/state.py:458–465  ·  view source on GitHub ↗

Return ``True`` if this object has an identity key. This should always have the same value as the expression ``state.persistent`` or ``state.detached``.

(self)

Source from the content-addressed store, hash-verified

456
457 @property
458 def has_identity(self) -> bool:
459 """Return ``True`` if this object has an identity key.
460
461 This should always have the same value as the
462 expression ``state.persistent`` or ``state.detached``.
463
464 """
465 return bool(self.key)
466
467 @classmethod
468 def _detach_states(

Callers 1

sessionMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected