From 0e9d26d263f548ee4883f3bff1b91b075eb4e126 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Tue, 15 Nov 2005 08:13:07 +0000 Subject: [PATCH] --- lib/sqlalchemy/mapper.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/sqlalchemy/mapper.py b/lib/sqlalchemy/mapper.py index bdbbb6a69d..a3b6fa5766 100644 --- a/lib/sqlalchemy/mapper.py +++ b/lib/sqlalchemy/mapper.py @@ -991,6 +991,9 @@ class LazyLoader(PropertyLoader): # in the case that those properties are saved in some other way to the DB in the same transaction that this object # is also saved. # + # hey and it also removes the callable from being attached to the object instance itself- objects with lazy + # laoders can be pickled ! + # # test case: make two mappers, A and B. A has a "one-to-many" relation to B, B has a "one-to-one" relation # to A. create a new object for "A", call it "Ao". # @@ -1013,10 +1016,7 @@ class LazyLoader(PropertyLoader): allparams = True #print "setting up loader, lazywhere", str(self.lazywhere) for col, bind in self.lazybinds.iteritems(): - if self.direction == PropertyLoader.RIGHT: - params[bind.key] = self.parent._getattrbycolumn(instance, col) - else: - params[bind.key] = self.parent._getattrbycolumn(instance, col) + params[bind.key] = self.parent._getattrbycolumn(instance, col) if params[bind.key] is None: allparams = False break -- 2.47.2