]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Cascade mappers in terms of the instance's mapper
authorMike Bayer <mike_mp@zzzcomputing.com>
Fri, 12 May 2017 14:53:54 +0000 (10:53 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Fri, 12 May 2017 14:53:54 +0000 (10:53 -0400)
commit0f8721fa52e335ab2abeb548c8914b99a8c5e1fd
tree1a286f7c2199e5c54c4fbac26187c6821fa7b9b3
parent4352e220ac04d09e120c441e79b1ac12c7ca2c45
Cascade mappers in terms of the instance's mapper

Fixed a (extremely old) bug in cascade_mappers where the
first cascade we do is against the "self" mapper, and not the
one that actually corresponds to the state given. These are
different in the case where we start with a relationship
to a class, and the instance is of a subclass, which itself
can have relationships that aren't on the base mapper.

A pretty severe bug that somehow has avoided the radar
since the beginning.

Change-Id: I512956b9757b07e06f3ca1ccb507a33fb10bed31
Fixes: #3986
doc/build/changelog/changelog_11.rst
lib/sqlalchemy/orm/mapper.py
test/orm/test_cascade.py