]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Support filter_by() from columns, functions, Core SQL
authorMike Bayer <mike_mp@zzzcomputing.com>
Sat, 1 May 2021 12:41:09 +0000 (08:41 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sat, 1 May 2021 15:54:21 +0000 (11:54 -0400)
commit5cde12d816b8b32719cee377677667150df07c48
tree2bfe72c72617f617d80301d08e19a845211fad9f
parenta47c158a9a3b1104698fc0bff47ca58d67cb9191
Support filter_by() from columns, functions, Core SQL

Fixed regression where :meth:`_orm.Query.filter_by` would not work if the
lead entity were a SQL function or other expression derived from the
primary entity in question, rather than a simple entity or column of that
entity. Additionally, improved the behavior of
:meth:`_sql.Select.filter_by` overall to work with column expressions even
in a non-ORM context.

Fixes: #6414
Change-Id: I316b5bf98293bec1ede08787f6181dd14be85419
doc/build/changelog/unreleased_14/6414.rst [new file with mode: 0644]
lib/sqlalchemy/sql/base.py
lib/sqlalchemy/sql/elements.py
lib/sqlalchemy/sql/functions.py
test/orm/test_query.py
test/sql/test_select.py