]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
- dont actually need separate init(), but be conservative for now.
authorMike Bayer <mike_mp@zzzcomputing.com>
Tue, 31 May 2011 22:06:57 +0000 (18:06 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 31 May 2011 22:06:57 +0000 (18:06 -0400)
lib/sqlalchemy/orm/interfaces.py

index 07a6a782c257c60ed8c0cb2fe43caa217cbb8f21..19c302ec9e1028f829987c853e6c5e6de0d57346 100644 (file)
@@ -313,7 +313,6 @@ class StrategizedProperty(MapperProperty):
 
     def __init_strategy(self, cls):
         self._strategies[cls] = strategy = cls(self)
-        strategy.init()
         return strategy
 
     def setup(self, context, entity, path, reduced_path, adapter, **kwargs):
@@ -638,6 +637,11 @@ class LoaderStrategy(object):
         self.is_class_level = False
         self.parent = self.parent_property.parent
         self.key = self.parent_property.key
+        # TODO: there's no particular reason we need
+        # the separate .init() method at this point.
+        # It's possible someone has written their
+        # own LS object.
+        self.init()
 
     def init(self):
         raise NotImplementedError("LoaderStrategy")