]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Ignore non-primary mappers within mutable instrumentation
authorMike Bayer <mike_mp@zzzcomputing.com>
Mon, 12 Mar 2018 16:50:52 +0000 (12:50 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Mon, 12 Mar 2018 16:51:54 +0000 (12:51 -0400)
commitaeb825fef70e40e02ce4de01e4d1053aafc0ccba
treeee1b933cbcb2349e12e869a021497bb4b98346f8
parentb8a928e5293d3bc4017e352da123176121178b71
Ignore non-primary mappers within mutable instrumentation

Fixed bug where using :meth:`.Mutable.associate_with` or
:meth:`.Mutable.as_mutable` in conjunction with a class that has non-
primary mappers set up with alternatively-named attributes would produce an
attribute error.  Since non-primary mappers are not used for persistence,
the mutable extension now excludes non-primary mappers from its
instrumentation steps.

Change-Id: I2630d9f771a171aece03181ccf9159885f68f25e
Fixes: #4215
(cherry picked from commit 0fd508ad32a6f94653757a5ae10c1eae14e099fc)
doc/build/changelog/unreleased_12/4215.rst [new file with mode: 0644]
lib/sqlalchemy/ext/mutable.py
test/ext/test_mutable.py