]> 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:37:49 +0000 (19:37 -0500)
commit432eb350a4b81ba557f14d49ebd37cf5899d5423
treeb84f3e306468baa567aab31a2ebdfa434c001055
parente00215cfcdab5186ab07889dda4a2280b5ad5d44
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
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