summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sqlalchemy')
-rw-r--r--lib/sqlalchemy/sql/type_api.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/sqlalchemy/sql/type_api.py b/lib/sqlalchemy/sql/type_api.py
index d3e0a008e..d414daf2a 100644
--- a/lib/sqlalchemy/sql/type_api.py
+++ b/lib/sqlalchemy/sql/type_api.py
@@ -630,9 +630,13 @@ class TypeDecorator(TypeEngine):
@property
def comparator_factory(self):
- return type("TDComparator",
- (TypeDecorator.Comparator, self.impl.comparator_factory),
- {})
+ if TypeDecorator.Comparator in self.impl.comparator_factory.__mro__:
+ return self.impl.comparator_factory
+ else:
+ return type("TDComparator",
+ (TypeDecorator.Comparator,
+ self.impl.comparator_factory),
+ {})
def _gen_dialect_impl(self, dialect):
"""