]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Warn when declared_attr.cascading detected on mapped class
authorMike Bayer <mike_mp@zzzcomputing.com>
Tue, 6 Jun 2017 21:13:54 +0000 (17:13 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 6 Jun 2017 21:16:58 +0000 (17:16 -0400)
commit4e1f5377d1c5443016cc6c5ae86b8053ead41647
tree423ed81611f61b9f2786a2d6f4a451aebe7bb003
parent6b68a70b5f903079f3c42a827daa3ea08a1a4b53
Warn when declared_attr.cascading detected on mapped class

A warning is emitted if the :attr:`.declared_attr.cascading` modifier
is used with a declarative attribute that is itself declared on
a class that is to be mapped, as opposed to a declarative mixin
class or ``__abstract__`` class.  The :attr:`.declared_attr.cascading`
modifier currently only applies to mixin/abstract classes.

Also add a test for @declared_attr.cascading when used on an attribute
on __abstract__.

Change-Id: Ib1b9dbe373e8be1cf24eadfed224a8988b3cd95d
Fixes: #3847
doc/build/changelog/changelog_12.rst
lib/sqlalchemy/ext/declarative/api.py
lib/sqlalchemy/ext/declarative/base.py
test/ext/declarative/test_basic.py
test/ext/declarative/test_mixin.py