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)
| 3358 | |
| 3359 | @HasMemoized.memoized_attribute |
| 3360 | def self_and_descendants(self) -> Sequence[Mapper[Any]]: |
| 3361 | """The collection including this mapper and all descendant mappers. |
| 3362 | |
| 3363 | This includes not just the immediately inheriting mappers but |
| 3364 | all their inheriting mappers as well. |
| 3365 | |
| 3366 | """ |
| 3367 | descendants = [] |
| 3368 | stack = deque([self]) |
| 3369 | while stack: |
| 3370 | item = stack.popleft() |
| 3371 | descendants.append(item) |
| 3372 | stack.extend(item._inheriting_mappers) |
| 3373 | return util.WeakSequence(descendants) |
| 3374 | |
| 3375 | def polymorphic_iterator(self) -> Iterator[Mapper[Any]]: |
| 3376 | """Iterate through the collection including this mapper and |