Fixed issue where ORM Annotated Declarative would not resolve forward
references correctly in all cases; in particular, when using
``from __future__ import annotations`` in combination with Pydantic
dataclasses.
Change-Id: If643c9a4ac7e217d4cb3a7d09b96cfd49432c44e
References: #9717
--- /dev/null
+.. change::
+ :tags: bug, orm
+ :tickets: 9717
+
+ Fixed issue where ORM Annotated Declarative would not resolve forward
+ references correctly in all cases; in particular, when using
+ ``from __future__ import annotations`` in combination with Pydantic
+ dataclasses.
original_annotation = annotation
- if is_fwd_ref(annotation) and not annotation.__forward_evaluated__:
+ if is_fwd_ref(annotation):
annotation = annotation.__forward_arg__
if isinstance(annotation, str):