Files
sqlalchemy/test
Mike Bayer 1c5ec1e609 Move enable_eagerloads(False) out of _from_self() into count()
Fixed regression where calling upon :meth:`_orm.Query.count` in conjunction
with a loader option such as :func:`_orm.joinedload` would fail to ignore
the loader option. This is a behavior that has always been very specific to
the :meth:`_orm.Query.count` method; an error is normally raised if a given
:class:`_orm.Query` has options that don't apply to what it is returning.

Specifically, the call to enable_eagerloads(False) inside of
_from_self() is not needed as loader options are now not invoked
for subqueries.  Instead, set enable_eagerloads(False) in the
count() method itself, so that these options won't be considered
in this specific case.

Fixes: #6052
Change-Id: I0059ed3fb06156ef4116fd015cbef6f89808e8ef
2021-03-15 20:05:26 -04:00
..
2021-03-04 11:10:44 -05:00
2021-03-14 21:31:08 +00:00