]> 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:50:52 +0000 (12:50 -0400)
commit0fd508ad32a6f94653757a5ae10c1eae14e099fc
tree457bcc42d36a999692df758fef6aed8e426d54be
parentf3e18baa00489b2a85293edcdb4c98cb409c8c93
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
doc/build/changelog/unreleased_12/4215.rst [new file with mode: 0644]
lib/sqlalchemy/ext/mutable.py
test/ext/test_mutable.py