[ Tim Peters wrote:] > [Jürgen Herrmann] >> hmm, as it seemed quite impossible the way i wanted it, i almost dropped >> it from my wishlist. now you say, it's doable... > > It would be possible to add new official APIs to ZODB to supply some > notion > of the collection of all modified objects, at the level ZODB "sees" > objects. > "Of course" that would be doable, given enough work (which I sketched). > >> i already had hacked into zodb.connection, > > That's part of what would be needed, yes. > >> the problem was that the objects maintained there >> (self._registered_objects) are not wrapped for acquisition, thus my >> reindexing method did not find the catalog to register with. how would >> you solve this problem? > > For the entirety of what you want to do, I'd pursue Jim's suggestion and > forget about working at the ZODB level. You didn't actually want "all > modified objects" to begin with: that appeared to be a hack, an indirect > way to get at what you do want, which is a very specific subset of > application objects that need to be reindexed. Jim suggested some > principled ways to accomplish that without hacking ZODB internals. i'd have the objects sorted out, that simply don't implement the necessary callback function. this way only the "interesting" objects would take part in that dance. knowing all modified objects just seemed an easy way to get where i wanted. > >> to answer your question above: a point-in-time list would be enough for >> me, just like to reindex all modified "model" objects. that should only >> change indexes. > > If we were to add official APIs to ZODB, we'd have to consider what > everyone > might want. Point-in-time is probably easiest to code, anyway. > hmm, after several posts to the zope list and now to the zodb-dev list also, i guess that no one actually needs these hooks. everyone that replied to me, suggested not to try it this way. now i wrote an index manager, that keeps track of registered objects - still i have to register objects in set methods and methods that otherwise change the state of objects but all the other stuff is the way i want it now.
in short: probably to much work if noone wants to use it afterwards (except me :))) regards, juergen herrmann _______________________________________________________________________ >> XLhost.de - eXperts in Linux hosting << Juergen Herrmann Weiherweg 10, 93051 Regensburg, Germany Fon: +49 (0)700 XLHOSTDE [0700 95467833] Fax: +49 (0)721 151 463027 ICQ: 27139974 - IRC: [EMAIL PROTECTED] WEB: http://www.XLhost.de _______________________________________________ For more information about ZODB, see the ZODB Wiki: http://www.zope.org/Wikis/ZODB/ ZODB-Dev mailing list - ZODB-Dev@zope.org http://mail.zope.org/mailman/listinfo/zodb-dev