diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2021-10-27 11:14:50 -0400 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2021-10-27 11:14:50 -0400 |
| commit | 5ad4190aa428dabc571e3d9c0e6a7944a384c8c3 (patch) | |
| tree | 226695dc956ec6ce116792c84347e52486ad109a /lib/sqlalchemy/orm/interfaces.py | |
| parent | d2cf7dcfe0cd7e9986376b6e7edd4b7d60108599 (diff) | |
| download | sqlalchemy-5ad4190aa428dabc571e3d9c0e6a7944a384c8c3.tar.gz | |
consider "inspect(_of_type)" to be the entity of a comparator
Fixed 1.4 regression where :meth:`_orm.Query.filter_by` would not function
correctly when :meth:`_orm.Query.join` were joined to an entity which made
use of :meth:`_orm.PropComparator.of_type` to specify an aliased version of
the target entity. The issue also applies to future style ORM queries
constructed with :func:`_sql.select`.
Fixes: #7244
Change-Id: Ied28a03ce93201f932c7172d283cd4297be4d592
Diffstat (limited to 'lib/sqlalchemy/orm/interfaces.py')
| -rw-r--r-- | lib/sqlalchemy/orm/interfaces.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/sqlalchemy/orm/interfaces.py b/lib/sqlalchemy/orm/interfaces.py index 903672c80..9eb362c43 100644 --- a/lib/sqlalchemy/orm/interfaces.py +++ b/lib/sqlalchemy/orm/interfaces.py @@ -475,7 +475,8 @@ class PropComparator(operators.ColumnOperators): def of_type(self, class_): r"""Redefine this object in terms of a polymorphic subclass, - :func:`.with_polymorphic` construct, or :func:`.aliased` construct. + :func:`_orm.with_polymorphic` construct, or :func:`_orm.aliased` + construct. Returns a new PropComparator from which further criterion can be evaluated. @@ -490,6 +491,8 @@ class PropComparator(operators.ColumnOperators): .. seealso:: + :ref:`queryguide_join_onclause` - in the :ref:`queryguide_toplevel` + :ref:`inheritance_of_type` """ |
