summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/orm/mapper.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2023-02-10 08:39:21 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2023-02-10 10:42:11 -0500
commiteb0861e8e69f8ce702301c558e552e1aeb2e9eba (patch)
tree638c8a08641e524b3ed54ee824275e5eb520ecbe /lib/sqlalchemy/orm/mapper.py
parent48aad8b244737ad7d2000056ce7320d6b32fa2de (diff)
downloadsqlalchemy-eb0861e8e69f8ce702301c558e552e1aeb2e9eba.tar.gz
generalize adapt_on_names to expect non-named elements
The fix in #9217 opened up adapt_on_names to more kinds of expressions than it was prepared for; adjust that logic and also refine in the ORM where we are using it, as we dont need it (yet) for the DML RETURNING use case. Fixed regression introduced in version 2.0.2 due to :ticket:`9217` where using DML RETURNING statements, as well as :meth:`_sql.Select.from_statement` constructs as was "fixed" in :ticket:`9217`, in conjunction with ORM mapped classes that used expressions such as with :func:`_orm.column_property`, would lead to an internal error within Core where it would attempt to match the expression by name. The fix repairs the Core issue, and also adjusts the fix in :ticket:`9217` to not take effect for the DML RETURNING use case, where it adds unnecessary overhead. Fixes: #9273 Change-Id: Ie0344efb12ff7df48f21e71e62dc598c76a6a0de
Diffstat (limited to 'lib/sqlalchemy/orm/mapper.py')
0 files changed, 0 insertions, 0 deletions