The collection including this mapper and all descendant mappers. This includes not just the immediately inheriting mappers but all their inheriting mappers as well.
(self)
| 3400 | |
| 3401 | @HasMemoized.memoized_attribute |
| 3402 | def self_and_descendants(self) -> Sequence[Mapper[Any]]: |
| 3403 | """The collection including this mapper and all descendant mappers. |
| 3404 | |
| 3405 | This includes not just the immediately inheriting mappers but |
| 3406 | all their inheriting mappers as well. |
| 3407 | |
| 3408 | """ |
| 3409 | descendants = [] |
| 3410 | stack = deque([self]) |
| 3411 | while stack: |
| 3412 | item = stack.popleft() |
| 3413 | descendants.append(item) |
| 3414 | stack.extend(item._inheriting_mappers) |
| 3415 | return util.WeakSequence(descendants) |
| 3416 | |
| 3417 | def polymorphic_iterator(self) -> Iterator[Mapper[Any]]: |
| 3418 | """Iterate through the collection including this mapper and |