diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2011-07-17 15:14:03 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2011-07-17 15:14:03 -0400 |
commit | 15cd4235b6e5bbcfebe14ba64f56b780ae2346d6 (patch) | |
tree | da60bd82f9084752cc46d114372f3cb16f17a3d0 /test/dialect/test_postgresql.py | |
parent | 7bb2adfff90f989d45cbcb6f306d8d9d82298816 (diff) | |
download | sqlalchemy-15cd4235b6e5bbcfebe14ba64f56b780ae2346d6.tar.gz |
- Feature enhancement: joined and subquery
loading will now traverse already-present related
objects and collections in search of unpopulated
attributes throughout the scope of the eager load
being defined, so that the eager loading that is
specified via mappings or query options
unconditionally takes place for the full depth,
populating whatever is not already populated.
Previously, this traversal would stop if a related
object or collection were already present leading
to inconsistent behavior (though would save on
loads/cycles for an already-loaded graph). For a
subqueryload, this means that the additional
SELECT statements emitted by subqueryload will
invoke unconditionally, no matter how much of the
existing graph is already present (hence the
controversy). The previous behavior of "stopping"
is still in effect when a query is the result of
an attribute-initiated lazyload, as otherwise an
"N+1" style of collection iteration can become
needlessly expensive when the same related object
is encountered repeatedly. There's also an
as-yet-not-public generative Query method
_with_invoke_all_eagers()
which selects old/new behavior [ticket:2213]
Diffstat (limited to 'test/dialect/test_postgresql.py')
0 files changed, 0 insertions, 0 deletions