]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
- Eager loading now functions at any arbitrary depth along self-referential
authorMike Bayer <mike_mp@zzzcomputing.com>
Fri, 20 Jul 2007 03:20:33 +0000 (03:20 +0000)
committerMike Bayer <mike_mp@zzzcomputing.com>
Fri, 20 Jul 2007 03:20:33 +0000 (03:20 +0000)
commit0836f5cdfdaff67f3232a6bdbd58ac75924dcafa
treef081911b747133cfe6ded302f591b169731d0af4
parent6318b43408b64f75121c41c74c00b35e8b80f639
-  Eager loading now functions at any arbitrary depth along self-referential
and cyclical structures.  When loading cyclical structures, specify "join_depth"
on relation() indicating how many times you'd like the table to join
to itself; each level gets a distinct table alias.
- adds a stack to the Mapper->eagerloader->Mapper process which is the single
point of tracking the various AliasedClause objects both at query compile
time as well as result fetching time.  self-referential relationships narrow
down the "aliasing" of tables more sharply so as to produce the correct
eager joins in those cases without stepping on more generalized cases.
the mechanism of detecting "too deep" of an eager load now works based on
locating a true cycle, but only if join_depth is not specified; otherwise
join_depth is used.
[ticket:659]
CHANGES
lib/sqlalchemy/orm/interfaces.py
lib/sqlalchemy/orm/mapper.py
lib/sqlalchemy/orm/properties.py
lib/sqlalchemy/orm/query.py
lib/sqlalchemy/orm/strategies.py
test/orm/cycles.py
test/orm/eager_relations.py
test/orm/inheritance/polymorph.py