MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / _add_with_polymorphic_subclass

Method _add_with_polymorphic_subclass

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

Source from the content-addressed store, hash-verified

1362 self._expire_memoizations()
1363
1364 def _add_with_polymorphic_subclass(self, mapper):
1365 subcl = mapper.class_
1366 if self.with_polymorphic is None:
1367 self._set_with_polymorphic((subcl,))
1368 elif self.with_polymorphic[0] != "*":
1369 assert isinstance(self.with_polymorphic[0], tuple)
1370 self._set_with_polymorphic(
1371 (self.with_polymorphic[0] + (subcl,), self.with_polymorphic[1])
1372 )
1373
1374 def _set_concrete_base(self, mapper):
1375 """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