(mapper, state, dict_)
| 2011 | self._polymorphic_attr_key = polymorphic_key |
| 2012 | |
| 2013 | def _validate_polymorphic_identity(mapper, state, dict_): |
| 2014 | if ( |
| 2015 | polymorphic_key in dict_ |
| 2016 | and dict_[polymorphic_key] |
| 2017 | not in mapper._acceptable_polymorphic_identities |
| 2018 | ): |
| 2019 | util.warn_limited( |
| 2020 | "Flushing object %s with " |
| 2021 | "incompatible polymorphic identity %r; the " |
| 2022 | "object may not refresh and/or load correctly", |
| 2023 | (state_str(state), dict_[polymorphic_key]), |
| 2024 | ) |
| 2025 | |
| 2026 | self._set_polymorphic_identity = _set_polymorphic_identity |
| 2027 | self._validate_polymorphic_identity = ( |
no test coverage detected