Re: Delete dex class

"David Glick (Plone)" <david.glick-z4DKO/[email protected]>
Newsgroups gmane.comp.web.zope.plone.user
Message-ID <[email protected]>
On 1/18/15 11:48 PM, Mike Metcalfe wrote:
> Sorry to have you guessing. I have an upgrade step that finds and 
> deletes all instances of a class and now I'd like to delete the class 
> itself. Is this the correct way:
>         ttool = getToolByName(portal, 'portal_types')
>         ttool.manage_delObjects([id])
>
That deletes the "factory type info" (FTI) object from portal_types, not 
the class. But perhaps that's what you meant? If your type used a custom 
class rather than the standard Item or Container, the FTI holds a 
reference to the class. So removing the FTI would take you one step 
closer to being able to safely delete the code for the class.

Instead of writing custom upgrade coe you could remove the FTI in 
types.xml in your GenericSetup profile, by specifying remove="true" for 
the FTI object.

David

------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.