Commits

Mike Bayer committed bd106cc

place _instance_key on object only when objectstore finally register_clean's on it, to make
room for more aggressive "identity map" assertion when modifying objects incoming from a result set

  • Participants
  • Parent commits e0761d3

Comments (0)

Files changed (1)

File lib/sqlalchemy/mapping/mapper.py

             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:
         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):