]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Repair clauselist comparison to account for clause ordering
authorMike Bayer <mike_mp@zzzcomputing.com>
Fri, 2 Sep 2016 15:27:58 +0000 (11:27 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Fri, 2 Sep 2016 15:54:16 +0000 (11:54 -0400)
commitce577d48449588d3e5395c08c7f4d04cb8bb325f
tree7803f9ea8126728b0754218d3aa386bae6e10ddf
parentf6022839c29f7f96cb9d279aaf2e44e81cafb661
Repair clauselist comparison to account for clause ordering

Fixed bug where the "simple many-to-one" condition that allows  lazy
loading to use get() from identity map would fail to be  invoked if the
primaryjoin of the relationship had multiple clauses separated by AND
which were not in the same order as that of the primary key columns
being compared in each clause. This ordering
difference occurs for a composite foreign key where the table-bound
columns on the referencing side were not in the same order in the .c
collection as the primary key columns on the referenced side....which
in turn occurs a lot if one is using declarative mixins and/or
declared_attr to set up columns.

Change-Id: I66cce74f614c04ed693dc0d58ac8c952b2f8ae54
Fixes: #3788
doc/build/changelog/changelog_11.rst
lib/sqlalchemy/sql/elements.py
lib/sqlalchemy/testing/__init__.py
lib/sqlalchemy/testing/assertions.py
test/orm/test_lazy_relations.py
test/sql/test_utils.py [new file with mode: 0644]