From: Mike Bayer Date: Tue, 15 Nov 2005 05:23:43 +0000 (+0000) Subject: enhancements to lazyloader. now you can pickle objects with lazyload. X-Git-Tag: rel_0_1_0~336 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7941d11c10632cff11d1bae1b717e2c0c665a176;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git enhancements to lazyloader. now you can pickle objects with lazyload. --- diff --git a/lib/sqlalchemy/attributes.py b/lib/sqlalchemy/attributes.py index 6f14566adb..90f3fb949e 100644 --- a/lib/sqlalchemy/attributes.py +++ b/lib/sqlalchemy/attributes.py @@ -248,6 +248,12 @@ class AttributeManager(object): obj.__dict__['_managed_attributes'] = attr return attr + def reset_history(self, obj, key): + try: + del self.attribute_history(obj)[key] + except KeyError: + pass + def class_managed(self, class_): try: attr = getattr(class_, '_class_managed_attributes')