]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
- Improved the error message emitted when a "backref loop" is detected,
authorMike Bayer <mike_mp@zzzcomputing.com>
Sun, 3 Mar 2013 18:59:12 +0000 (13:59 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sun, 3 Mar 2013 18:59:12 +0000 (13:59 -0500)
commita7efed74c3e966fc476b68719ac2ffd8f85a45b9
tree55fabb2d1e9e4914b5463bcd13bc309b6a3984ce
parentabd9f52ade78c737571be69f21dba384be3edf4e
- Improved the error message emitted when a "backref loop" is detected,
that is when an attribute event triggers a bidirectional
assignment between two other attributes with no end.
This condition can occur not just when an object of the wrong
type is assigned, but also when an attribute is mis-configured
to backref into an existing backref pair.
- A warning is emitted when a MapperProperty is assigned to a mapper
that replaces an existing property, if the properties in question
aren't plain column-based properties.   Replacement of relationship
properties is rarely (ever?) what is intended and usually refers to a
mapper mis-configuration.   This will also warn if a backref configures
itself on top of an existing one in an inheritance relationship
(which is an error in 0.8).
backport for [ticket:2674]
doc/build/changelog/changelog_07.rst
lib/sqlalchemy/orm/attributes.py
lib/sqlalchemy/orm/mapper.py
test/orm/test_attributes.py
test/orm/test_compile.py
test/orm/test_mapper.py