]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
- Fixed bug regarding calculation of "from" list
authorMike Bayer <mike_mp@zzzcomputing.com>
Mon, 5 Sep 2011 23:12:12 +0000 (19:12 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Mon, 5 Sep 2011 23:12:12 +0000 (19:12 -0400)
commit8c0e82238c39ee068a5fe143d06c5b681127d62f
tree35d6401fb245f01a778cbce76378978f06c39db4
parent56e374776dfc5e6d371a27e24dc2646c844f4c0f
- Fixed bug regarding calculation of "from" list
for a select() element.  The "from" calc is now
delayed, so that if the construct uses a Column
object that is not yet attached to a Table,
but is later associated with a Table, it generates
SQL using the table as a FROM.   This change
impacted fairly deeply the mechanics of how
the FROM list as well as the "correlates" collection
is calculated, as some "clause adaption" schemes
(these are used very heavily in the ORM)
were relying upon the fact that the "froms"
collection would typically be cached before the
adaption completed.   The rework allows it
such that the "froms" collection can be cleared
and re-generated at any time.  [ticket:2261]
- RelationshipProperty.Comparator._criterion_exists()
adds an "_orm_adapt" annotation to the correlates target,
to work with the change in [ticket:2261].   It's not clear
if the change to correlation+adaption mechanics will affect end user
code yet.
- FromClause now uses group_expirable_memoized_property for
late-generated values like primary key, _columns, etc.
The Select class adds some tokens to this object and has the
nice effect that FromClause doesn't need to know about
Select's names anymore.   An additional change might be to
have Select use a different group_expirable_memoized_property
so that it's collection of attribute names are specific to
Select though this isn't really necessary right now.
CHANGES
lib/sqlalchemy/orm/properties.py
lib/sqlalchemy/sql/expression.py
lib/sqlalchemy/util/langhelpers.py
test/orm/inheritance/test_query.py
test/orm/test_selectable.py
test/sql/test_selectable.py