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

Method _add_with_polymorphic_subclass

lib/sqlalchemy/orm/mapper.py:1429–1437  ·  view source on GitHub ↗
(self, mapper)

Source from the content-addressed store, hash-verified

1427 self._expire_memoizations()
1428
1429 def _add_with_polymorphic_subclass(self, mapper):
1430 subcl = mapper.class_
1431 if self.with_polymorphic is None:
1432 self._set_with_polymorphic((subcl,))
1433 elif self.with_polymorphic[0] != "*":
1434 assert isinstance(self.with_polymorphic[0], tuple)
1435 self._set_with_polymorphic(
1436 (self.with_polymorphic[0] + (subcl,), self.with_polymorphic[1])
1437 )
1438
1439 def _set_concrete_base(self, mapper):
1440 """Set the given :class:`_orm.Mapper` as the 'inherits' for this

Callers 1

Calls 1

_set_with_polymorphicMethod · 0.95

Tested by

no test coverage detected