]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
rework to expire() to make it smarter. when you expire(), history is immediately...
authorMike Bayer <mike_mp@zzzcomputing.com>
Sun, 26 Mar 2006 21:44:22 +0000 (21:44 +0000)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sun, 26 Mar 2006 21:44:22 +0000 (21:44 +0000)
commitcb3be7803bd2d8071ead35d5f053c90f706a678b
treec2412d863c4f07b149d41a863b02f1f26dcc0925
parentc0775bdadc0ad37b7823379c5ab03df98b63da44
rework to expire() to make it smarter.  when you expire(), history is immediately removed as well as explicit from dirty/deleted lists.  this also changes uow.rollback_object() to remove from those lists, which is strange that it didnt do that before.  anyway the mapper, when selecting and creating instances, asks the uow if this already identity-mapped instance is expired, and if so refreshes it on the fly, saving the need for the re-_get() operation, if some other query happens to touch upon the expired object.  unit test added to confirm this.
lib/sqlalchemy/attributes.py
lib/sqlalchemy/mapping/mapper.py
lib/sqlalchemy/mapping/objectstore.py
lib/sqlalchemy/mapping/unitofwork.py
test/mapper.py