From 097e1eacaaf43f728c552df9ebbfa0fb81c4b6c7 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Tue, 21 Feb 2023 11:06:17 -0500 Subject: fix with_polymorphic Fixed typing issue where :func:`_orm.with_polymorphic` would not record the class type correctly. Fixes: #9340 Change-Id: I535ad9aede9b60475231028adb8dc270e55738a4 --- lib/sqlalchemy/orm/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/sqlalchemy/orm/util.py') diff --git a/lib/sqlalchemy/orm/util.py b/lib/sqlalchemy/orm/util.py index ad9ce2013..1ef0d7159 100644 --- a/lib/sqlalchemy/orm/util.py +++ b/lib/sqlalchemy/orm/util.py @@ -994,7 +994,7 @@ class AliasedInsp( @classmethod def _with_polymorphic_factory( cls, - base: Union[_O, Mapper[_O]], + base: Union[Type[_O], Mapper[_O]], classes: Union[Literal["*"], Iterable[_EntityType[Any]]], selectable: Union[Literal[False, None], FromClause] = False, flat: bool = False, -- cgit v1.2.1