Sourced from sqlalchemy's releases.
2.0.21
Released: September 18, 2023
orm
[orm] [bug] Adjusted the ORM's interpretation of the "target" entity used within
Update
andDelete
to not interfere with the target "from" object passed to the statement, such as when passing an ORM-mapped_orm.aliased
construct that should be maintained within a phrase like "UPDATE FROM". Cases like ORM session synchonize using "SELECT" statements such as with MySQL/ MariaDB will still have issues with UPDATE/DELETE of this form so it's best to disable synchonize_session when using DML statements of this type.References: #10279
[orm] [bug] Added new capability to the
_orm.selectin_polymorphic()
loader option which allows other loader options to be bundled as siblings, referring to one of its subclasses, within the sub-options of parent loader option. Previously, this pattern was only supported if the_orm.selectin_polymorphic()
were at the top level of the options for the query. See new documentation section for example.As part of this change, improved the behavior of the
_orm.Load.selectin_polymorphic()
method / loader strategy so that the subclass load does not load most already-loaded columns from the parent table, when the option is used against a class that is already being relationship-loaded. Previously, the logic to load only the subclass columns worked only for a top level class load.References: #10348
engine
[engine] [bug] Fixed a series of reflection issues affecting the PostgreSQL, MySQL/MariaDB, and SQLite dialects when reflecting foreign key constraints where the target column contained parenthesis in one or both of the table name or column name.
References: #10275
sql
- [sql] [usecase] Adjusted the
_types.Enum
datatype to accept an argument ofNone
for the_types.Enum.length
parameter, resulting in a VARCHAR or other textual type with no length in the resulting DDL. This
... (truncated)