]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
(no commit message)
authorMike Bayer <mike_mp@zzzcomputing.com>
Sat, 3 Sep 2005 09:23:12 +0000 (09:23 +0000)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sat, 3 Sep 2005 09:23:12 +0000 (09:23 +0000)
lib/sqlalchemy/mapper.py
test/mapper.py

index 79550b33045ae1876c49d1e8df8e1ae5e1b03d2f..0a9f8251fbad23786b5a9245848fa407ca6a4f59 100644 (file)
@@ -503,7 +503,7 @@ class EagerLoader(PropertyLoader):
         # figure out tables in the various join clauses we have, because user-defined
         # whereclauses that reference the same tables will be converted to use
         # aliases of those tables
-        self.to_alias = util.Set()
+        self.to_alias = util.HashSet()
         [self.to_alias.append(f) for f in self.primaryjoin._get_from_objects()]
         if self.secondaryjoin is not None:
             [self.to_alias.append(f) for f in self.secondaryjoin._get_from_objects()]
index e6dd88d4c10d4df4ed4a5c3a61b6c3f7a2de458a..120dc188eb6f031db7e02799ba7bcab60935ab3a 100644 (file)
@@ -58,11 +58,14 @@ class MapperTest(AssertMixin):
         #globalidentity().clear()
 
     def testget(self):
-        m = mapper(User, users, echo = True)
+        m = mapper(User, users, scope = "thread", echo = True)
         self.assert_(m.get(19) is None)
         u = m.get(7)
         u2 = m.get(7)
         self.assert_(u is u2)
+        identity_map.clear("thread")
+        u2 = m.get(7)
+        self.assert_(u is not u2)
 
     def testload(self):
         """tests loading rows with a mapper and producing object instances"""