diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2013-06-10 20:10:06 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2013-06-10 20:10:06 -0400 |
commit | 02ec9afb15c2a215e0d8b777669a6edc2ed00451 (patch) | |
tree | 36845c65b249063b6883e947fe7907e1d8a0b0b1 | |
parent | ef03ecf6064c9a50bb6564046e6f97109c1a9f70 (diff) | |
download | sqlalchemy-02ec9afb15c2a215e0d8b777669a6edc2ed00451.tar.gz |
changelog for this
-rw-r--r-- | doc/build/changelog/changelog_09.rst | 37 |
1 files changed, 36 insertions, 1 deletions
diff --git a/doc/build/changelog/changelog_09.rst b/doc/build/changelog/changelog_09.rst index 4a5ad33cb..1ec648474 100644 --- a/doc/build/changelog/changelog_09.rst +++ b/doc/build/changelog/changelog_09.rst @@ -91,6 +91,35 @@ not ``Cls.associated`` has any rows present, regardless of whether or not ``Cls.associated.scalar`` is NULL or not. + + .. change:: + :tags: feature, orm + :tickets: 2587 + + A major change regarding how the ORM constructs joins where + the right side is itself a join or left outer join. The ORM + is now configured to allow simple nesting of joins of + the form ``a JOIN (b JOIN c ON b.id=c.id) ON a.id=b.id``, + rather than forcing the right side into a ``SELECT`` subquery. + This should allow significant performance improvements on most + backends, most particularly MySQL. The one database backend + that has for many years held back this change, SQLite, is now addressed by + moving the production of the ``SELECT`` subquery from the + ORM to the SQL compiler; so that a right-nested join on SQLite will still + ultimately render with a ``SELECT``, while all other backends + are no longer impacted by this workaround. + + As part of this change, a new argument ``flat=True`` has been added + to the :func:`.orm.aliased`, :meth:`.Join.alias`, and + :func:`.orm.with_polymorphic` functions, which allows an "alias" of a + JOIN to be produced which applies an anonymous alias to each component + table within the join, rather than producing a subquery. + + .. seealso:: + + :ref:`feature_joins_09` + + .. change:: :tags: bug, orm :tickets: 2369 @@ -102,7 +131,13 @@ rows that would come back. The "secondary" and right-side tables are now inner joined inside of parenthesis for all ORM joins on many-to-many relationships so that the left->right - join can accurately filtered. + join can accurately filtered. This change was made possible + by finally addressing the issue with right-nested joins + outlined in :ticket:`2587`. + + .. seealso:: + + :ref:`feature_joins_09` .. change:: :tags: bug, mssql |