diff options
Diffstat (limited to 'lib/sqlalchemy')
| -rw-r--r-- | lib/sqlalchemy/sql/base.py | 2 | ||||
| -rw-r--r-- | lib/sqlalchemy/sql/type_api.py | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/lib/sqlalchemy/sql/base.py b/lib/sqlalchemy/sql/base.py index cf7dcfd31..0b036847b 100644 --- a/lib/sqlalchemy/sql/base.py +++ b/lib/sqlalchemy/sql/base.py @@ -426,8 +426,6 @@ class SchemaEventTarget(object): def _set_parent(self, parent): """Associate with this SchemaEvent's parent object.""" - raise NotImplementedError() - def _set_parent_with_dispatch(self, parent): self.dispatch.before_parent_attach(self, parent) self._set_parent(parent) diff --git a/lib/sqlalchemy/sql/type_api.py b/lib/sqlalchemy/sql/type_api.py index 689b4c79b..98ede4e66 100644 --- a/lib/sqlalchemy/sql/type_api.py +++ b/lib/sqlalchemy/sql/type_api.py @@ -860,12 +860,16 @@ class TypeDecorator(SchemaEventTarget, TypeEngine): def _set_parent(self, column): """Support SchemaEentTarget""" + super(TypeDecorator, self)._set_parent(column) + if isinstance(self.impl, SchemaEventTarget): self.impl._set_parent(column) def _set_parent_with_dispatch(self, parent): """Support SchemaEentTarget""" + super(TypeDecorator, self)._set_parent_with_dispatch(parent) + if isinstance(self.impl, SchemaEventTarget): self.impl._set_parent_with_dispatch(parent) |
