From 36d0a27770efdebb0b1891083cb72d8ac65c4788 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Mon, 4 Dec 2017 16:40:20 -0500 Subject: Propagate attachment events for ARRAY Fixed regression in :class:`.ARRAY` datatype caused by :ticket:`3964`, which is essentially the same issue as that of :ticket:`3832`, where column attachment events for :class:`.ARRAY` would not be invoked. This breaks the use case of using declarative mixins that declare a :class:`.Column` which makes use of :meth:`.MutableList.as_mutable`. Change-Id: If8c57615860883837f6cf72661e46180a77778c1 Fixes: #4141 --- lib/sqlalchemy/sql/sqltypes.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/sqlalchemy/sql') diff --git a/lib/sqlalchemy/sql/sqltypes.py b/lib/sqlalchemy/sql/sqltypes.py index 2a30bf832..872ccfe74 100644 --- a/lib/sqlalchemy/sql/sqltypes.py +++ b/lib/sqlalchemy/sql/sqltypes.py @@ -2411,6 +2411,8 @@ class ARRAY(SchemaEventTarget, Indexable, Concatenable, TypeEngine): def _set_parent_with_dispatch(self, parent): """Support SchemaEventTarget""" + super(ARRAY, self)._set_parent_with_dispatch(parent) + if isinstance(self.item_type, SchemaEventTarget): self.item_type._set_parent_with_dispatch(parent) -- cgit v1.2.1