I was just reading the code of import_instance() when something
got my attention:
key = getattr(instance, '_instance_key', None)
mapper = object_mapper(instance)
u = self.uow
if key is not None:
if u.identity_map.has_key(key):
return u.identity_map[key]
else:
instance._instance_key = key
u.identity_map[key] = instance
self._bind_to(instance)
else:
u.register_new(instance)
Considering that 'key' comes from instance._instance_key,
doing 'instance._instance_key = key' shouldn't be needed.
--
Gustavo Niemeyer
http://niemeyer.net
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Sqlalchemy-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users