migrate zclass to disk product
Hi; Anyone have any pointers for migrating a product from zclass to disk-based? I did some googling (with no success), and I am ready to do some experimentation, but I think I would rather hear/read from someone who has tried this before I start hacking things up. My best thought so far is just to hide the ZClass (Make its "Add list name" a blank string) then create a new disk product which takes over the "Add list name". Does that sound like the best plan? Is this going to cause confusion? What about meta_type conflict? Is it possible for a new product to take over and actually be the class for those already created instances? _________________________________________________________________ Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
Lee Harr wrote:
Hi;
Anyone have any pointers for migrating a product from zclass to disk-based?
Yes. Use the Easyproduct to create the product: http://www.zope.org/Members/maxm/HowTo/easyProduct
My best thought so far is just to hide the ZClass (Make its "Add list name" a blank string) then create a new disk product which takes over the "Add list name".
No. You create a new product, preferably with a new metatype. Then you write an external script that finds all instances of your zclass and converts them to the new disk based product. You do this by copying the old values to an instance of the new product. Then you delete the old object, and save the new instance with the same id. # hint! # ZopeFind finds every object in Zope with certain metatypes objects = self.ZopeFind(self, obj_metatypes=[meta_type], search_sub=1) for path, obj in objects: # convert objects here regards Max M -- hilsen/regards Max M http://www.futureport.dk/ Fremtiden, videnskab, skeptiscisme og transhumanisme
participants (2)
-
Lee Harr -
Max M