From 152163b3336970460b605fc2a79766d94f467f8d Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Sun, 23 Sep 2012 12:51:24 -0400 Subject: - [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] --- lib/sqlalchemy/util/langhelpers.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/sqlalchemy/util/langhelpers.py') 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. -- cgit v1.2.1