(mapper, state, dict_)
| 1930 | self._polymorphic_attr_key = polymorphic_key |
| 1931 | |
| 1932 | def _validate_polymorphic_identity(mapper, state, dict_): |
| 1933 | if ( |
| 1934 | polymorphic_key in dict_ |
| 1935 | and dict_[polymorphic_key] |
| 1936 | not in mapper._acceptable_polymorphic_identities |
| 1937 | ): |
| 1938 | util.warn_limited( |
| 1939 | "Flushing object %s with " |
| 1940 | "incompatible polymorphic identity %r; the " |
| 1941 | "object may not refresh and/or load correctly", |
| 1942 | (state_str(state), dict_[polymorphic_key]), |
| 1943 | ) |
| 1944 | |
| 1945 | self._set_polymorphic_identity = _set_polymorphic_identity |
| 1946 | self._validate_polymorphic_identity = ( |
no test coverage detected