From: Mike Bayer Date: Tue, 15 Nov 2005 08:13:07 +0000 (+0000) Subject: (no commit message) X-Git-Tag: rel_0_1_0~331 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0e9d26d263f548ee4883f3bff1b91b075eb4e126;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git --- 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