]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
place _instance_key on object only when objectstore finally register_clean's on it...
authorMike Bayer <mike_mp@zzzcomputing.com>
Sun, 26 Feb 2006 21:39:14 +0000 (21:39 +0000)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sun, 26 Feb 2006 21:39:14 +0000 (21:39 +0000)
room for more aggressive "identity map" assertion when modifying objects incoming from a result set

lib/sqlalchemy/mapping/mapper.py

index 33bec863e82ec74f09ecf2f8bb0e29b986018678..4541c899a9d2818e2f2d829fb4c197ec9b970961 100644 (file)
@@ -724,8 +724,6 @@ class Mapper(object):
             instance = self.extension.create_instance(self, row, imap, self.class_)
             if instance is None:
                 instance = self.class_(_mapper_nohistory=True)
-            instance._instance_key = identitykey
-
             imap[identitykey] = instance
             isnew = True
         else:
@@ -742,7 +740,7 @@ class Mapper(object):
         if self.extension.append_result(self, row, imap, result, instance, isnew, populate_existing=populate_existing):
             if result is not None:
                 result.append_nohistory(instance)
-            
+
         return instance
 
 class MapperProperty(object):