]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
always derive type from element in annotated case
authorMike Bayer <mike_mp@zzzcomputing.com>
Mon, 6 Nov 2023 22:46:14 +0000 (17:46 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 7 Nov 2023 00:38:00 +0000 (19:38 -0500)
commit64a97ab900e5876b8348d8d658bcbc90c31da9c1
treede08cfa2863ad41f7bc3838dcd13b1526a888c96
parentead4c3da2a15fef5744264d2278be813b5b392fd
always derive type from element in annotated case

Fixed issue where use of :func:`_orm.foreign` annotation on a
non-initialized :func:`_orm.mapped_column` construct would produce an
expression without a type, which was then not updated at initialization
time of the actual column, leading to issues such as relationships not
determining ``use_get`` appropriately.

Fixes: #10597
Change-Id: I8339ba715ec6bd1f50888f8a424c3ac156e2364f
(cherry picked from commit 432eb350a4b81ba557f14d49ebd37cf5899d5423)
doc/build/changelog/unreleased_20/10597.rst [new file with mode: 0644]
lib/sqlalchemy/sql/elements.py
lib/sqlalchemy/sql/schema.py
test/orm/declarative/test_tm_future_annotations_sync.py
test/orm/declarative/test_typed_mapping.py
test/sql/test_selectable.py