]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Fix use_existing_column with Annotated mapped_column in polymorphic inheritance
authorMike Bayer <mike_mp@zzzcomputing.com>
Tue, 5 Aug 2025 18:05:49 +0000 (14:05 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 5 Aug 2025 18:58:47 +0000 (14:58 -0400)
commit14a18d4591818bfa5081c4286881cbd017dc186b
treeaf363687b8d144ac6fa74709ec2a7ff3f1147431
parent3bf487310734cd4a2588229ca62025a765962c29
Fix use_existing_column with Annotated mapped_column in polymorphic inheritance

Fixed issue where :paramref:`_orm.mapped_column.use_existing_column`
parameter in :func:`_orm.mapped_column` would not work when the
:func:`_orm.mapped_column` is used inside of an ``Annotated`` type alias in
polymorphic inheritance scenarios. The parameter is now properly recognized
and processed during declarative mapping configuration.

Fixes: #12787
Change-Id: I0505df3f3714434e98052c4488f6b1b1d2b1f755
doc/build/changelog/unreleased_20/12787.rst [new file with mode: 0644]
lib/sqlalchemy/orm/descriptor_props.py
lib/sqlalchemy/orm/properties.py
test/orm/declarative/test_tm_future_annotations_sync.py
test/orm/declarative/test_typed_mapping.py