summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/util/langhelpers.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2012-09-23 12:51:24 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2012-09-23 12:51:24 -0400
commit152163b3336970460b605fc2a79766d94f467f8d (patch)
treea5e1014cdb244ee792ccdf7447a61b747d1bb7f1 /lib/sqlalchemy/util/langhelpers.py
parente354dd10f8c3cc19e9cb3a6536f98798ba3538f1 (diff)
downloadsqlalchemy-152163b3336970460b605fc2a79766d94f467f8d.tar.gz
- [bug] When the primary key column of a Table
is replaced, such as via extend_existing, the "auto increment" column used by insert() constructs is reset. Previously it would remain referring to the previous primary key column. [ticket:2525]
Diffstat (limited to 'lib/sqlalchemy/util/langhelpers.py')
-rw-r--r--lib/sqlalchemy/util/langhelpers.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/sqlalchemy/util/langhelpers.py b/lib/sqlalchemy/util/langhelpers.py
index ac4b5527a..7fe5d3e82 100644
--- a/lib/sqlalchemy/util/langhelpers.py
+++ b/lib/sqlalchemy/util/langhelpers.py
@@ -537,6 +537,8 @@ class memoized_property(object):
obj.__dict__[self.__name__] = result = self.fget(obj)
return result
+ def _reset(self, obj):
+ obj.__dict__.pop(self.__name__, None)
class memoized_instancemethod(object):
"""Decorate a method memoize its return value.