[ZODB-Dev] List of references to all objects from ZODB?
Magnus Lycka
magnus@thinkware.se
Wed, 30 Oct 2002 02:18:11 +0100
Is there a way to get a list of all objects that ZODB
thinks exists?
I thought I'd have to do something like the following
to implement my undo-function.
old_obj_list = db.get_a_list_all_the_objects_somehow()
db.undo(xxxx)
get_transaction().commit()
conn.sync()
new_obj_list = db.get_a_list_all_the_objects_somehow()
for oldie in old_obj_list:
if oldie in new_obj_list:
oldie._p_deactivate()
else:
# G.B'd object. Handle somehow...
for window in window_list: window.refresh()
Is there something like db.get_a_list_all_the_objects_somehow()
or do I have to keep my own list of all stuff?
--
Magnus Lycka, Thinkware AB
Alvans vag 99, SE-907 50 UMEA, SWEDEN
phone: int+46 70 582 80 65, fax: int+46 70 612 80 65
http://www.thinkware.se/ mailto:magnus@thinkware.se