note unrelated columns in the "extra criteria" as either should be adapted or not adapted, even though they are not part of our "local" or "remote" side. see #9779 for this case, as well as #11010 for a follow up
(
elem: SupportsAnnotations, annotations: _AnnotationDict
)
| 3304 | if extra_criteria: |
| 3305 | |
| 3306 | def mark_exclude_cols( |
| 3307 | elem: SupportsAnnotations, annotations: _AnnotationDict |
| 3308 | ) -> SupportsAnnotations: |
| 3309 | """note unrelated columns in the "extra criteria" as either |
| 3310 | should be adapted or not adapted, even though they are not |
| 3311 | part of our "local" or "remote" side. |
| 3312 | |
| 3313 | see #9779 for this case, as well as #11010 for a follow up |
| 3314 | |
| 3315 | """ |
| 3316 | |
| 3317 | parentmapper_for_element = elem._annotations.get( |
| 3318 | "parentmapper", None |
| 3319 | ) |
| 3320 | |
| 3321 | if ( |
| 3322 | # NOTE: it's not clear yet if this needs to test for |
| 3323 | # parentmapper_for_element.isa(self.prop.parent). so far |
| 3324 | # we have not come up with a test. |
| 3325 | parentmapper_for_element is not self.prop.parent |
| 3326 | and ( |
| 3327 | parentmapper_for_element is None |
| 3328 | or not parentmapper_for_element.isa(self.prop.mapper) |
| 3329 | ) |
| 3330 | and elem not in self._secondary_lineage_set |
| 3331 | ): |
| 3332 | return _safe_annotate(elem, annotations) |
| 3333 | else: |
| 3334 | return elem |
| 3335 | |
| 3336 | extra_criteria = tuple( |
| 3337 | _deep_annotate( |
nothing calls this directly
no test coverage detected