Mailing List Archive

Deleting a ZCatalog Object from ZODB
Hi Guys,



I have successfully setup Zope to query a MySQL database and catalog the
data using the infamous Catalog Anything technique
(http://zope.org/Members/rbickers/cataloganything). One caveat that
occurs is that when you delete an object from the MySQL database and you
run the Python script to update the ZCatalog, the deleted entry will
still reside in the ZCatalog unless you update the catalog from the
Advanced tab. But there must be another more efficient way to delete
just the single object in the ZCatalog.



Using catalog_object() you can insert the data into the ZCatalog. Is
there a function (to be used in the Python Script) that can remove
object from the ZCatalog as well?



Thanks,



Mike
Re: Deleting a ZCatalog Object from ZODB [ In reply to ]
Takahashi, Michael wrote at 2005-7-7 09:27 -0700:
....
>But there must be another more efficient way to delete
>just the single object in the ZCatalog.

Indeed: If you look at the catalog API (e.g. in the source
or via "DocFinder"), you will find the "uncatalog_object" method.

--
Dieter
_______________________________________________
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db