From 7941d11c10632cff11d1bae1b717e2c0c665a176 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Tue, 15 Nov 2005 05:23:43 +0000 Subject: [PATCH] enhancements to lazyloader. now you can pickle objects with lazyload. --- lib/sqlalchemy/attributes.py | 6 ++++++ 1 file changed, 6 insertions(+) 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') -- 2.47.2