]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
(no commit message)
authorMike Bayer <mike_mp@zzzcomputing.com>
Fri, 16 Sep 2005 07:27:33 +0000 (07:27 +0000)
committerMike Bayer <mike_mp@zzzcomputing.com>
Fri, 16 Sep 2005 07:27:33 +0000 (07:27 +0000)
lib/sqlalchemy/mapper.py
test/mapper.py

index a50b2b7c7d0d9657649e30313cb2cc195416c96e..3f184f2939813be7306098ec0d368a0b788e9e9a 100644 (file)
@@ -688,7 +688,7 @@ class EagerLoader(PropertyLoader):
         it to a list on the parent instance."""
         if not self.uselist:
             # TODO: check for multiple values on single-element child element ?
-            setattr(instance, self.key, self.mapper._instance(row))
+            setattr(instance, self.key, self.mapper._instance(row, imap))
             return
         elif isnew:
             result_list = objectstore.uow().register_list_attribute(instance, self.key, data = [])
index a9b5a40bfffd3f069ede71248d091b0182095706..1ea8d33396216f5965e999f96e6446f9d8f3479a 100644 (file)
@@ -311,21 +311,15 @@ class SaveTest(AssertMixin):
         objectstore.uow().register_new(u)
         
         objectstore.uow().commit(u)
-        print "OK"
         objectstore.uow().commit()
 
         # assert the first one retreives the same from the identity map
         nu = m.get(u.user_id)
         self.assert_(u is nu)
         
-        print "STEP 1"
-        print repr(objectstore.identity_map)
-        
         # clear out the identity map, so next get forces a SELECT
         objectstore.clear()
 
-        print "STEP 2"
-        print repr(objectstore.identity_map)
 
         # check it again, identity should be different but ids the same
         nu = m.get(u.user_id)
@@ -333,15 +327,11 @@ class SaveTest(AssertMixin):
 
         # change first users name and save
         u.user_name = 'modifiedname'
-        print "STEP 3"
-        print repr(objectstore.identity_map)
         objectstore.uow().commit()
 
         # select both
         #objectstore.clear()
         userlist = m.select(users.c.user_id.in_(u.user_id, u2.user_id), order_by=[users.c.user_name])
-        print repr(userlist)
-        # making a slight assumption here about the IN clause mechanics with regards to ordering
         self.assert_(u.user_id == userlist[0].user_id and userlist[0].user_name == 'modifiedname')
         self.assert_(u2.user_id == userlist[1].user_id and userlist[1].user_name == 'savetester2')