summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2011-01-25 22:37:18 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2011-01-25 22:37:18 -0500
commit3ac7ec476e5a52892a48f1932a5452ed9263c758 (patch)
tree7d354ba32544d5ff94dff96cfbcb4089a1d7ee9c /lib/sqlalchemy
parent86e6c2bafb03e9620f6289c709d0076e6291f624 (diff)
downloadsqlalchemy-3ac7ec476e5a52892a48f1932a5452ed9263c758.tar.gz
- fix oracle tests
- fix some obnoxious type adaption issues resulting from the "adapt must copy" change
Diffstat (limited to 'lib/sqlalchemy')
-rw-r--r--lib/sqlalchemy/types.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/sqlalchemy/types.py b/lib/sqlalchemy/types.py
index 1dcf379a9..f9320cf3e 100644
--- a/lib/sqlalchemy/types.py
+++ b/lib/sqlalchemy/types.py
@@ -427,7 +427,7 @@ class TypeDecorator(TypeEngine):
"""
adapted = dialect.type_descriptor(self)
- if adapted is not self:
+ if type(adapted) is not type(self):
return adapted
elif isinstance(self.impl, TypeDecorator):
return self.impl.type_engine(dialect)
@@ -1785,7 +1785,11 @@ class Interval(_DateAffinity, TypeDecorator):
if self.native and hasattr(cls, '_adapt_from_generic_interval'):
return cls._adapt_from_generic_interval(self, **kw)
else:
- return cls(**kw)
+ return self.__class__(
+ native=self.native,
+ second_precision=self.second_precision,
+ day_precision=self.day_precision,
+ **kw)
def bind_processor(self, dialect):
impl_processor = self.impl.bind_processor(dialect)