approach for persistent global links - is this good?
Salut everybody, in a yellow pages ("zyp") product I need pointers or links between objects. For example I have categories and links to categories. It is necessary, that such a link to a category is still valid after having moved the category; this is why storing away the path isn't applicable. As of now, Zope doesn't provide a global id one can work with. (For a discussion about this issue and possible solutions in the future, see http://dev.zope.org/Wikis/DevSite/Proposals/ObjectHub ) I found a solution which seems to work fine for me: each category gets an attribute called "zid". This zid is globally unique. (Based on a mechanism presented by alex.khan http://dev.zope.org/Members/alex.khan/GlobalSystemId ) Storing a link is as easy as storing the zid of the linked category. However, the lookup of a linked category is done by a lookup in a ZCatalog with an appropriate field index. What do you think about this? This might not be such a good idea in terms of performance. Your comments are very welcome Jens Wolk
participants (1)
-
Jens Wolk