On Feb 8, 2008 3:34 PM, Dieter Maurer <[EMAIL PROTECTED]> wrote: > David Chelimsky wrote at 2008-2-7 13:17 -0600: > >I have a product in use on many of my client sites. I'd like to rename > >the meta_type of one of the classes, but I notice that when I do, the > >pre-existing objects retain their old meta_type. > > Then these instances misbehave: they have assigned the "meta_type" > attribute themselves rather than used the class level attribute > (which they should have done). > > >Is there a way for me to force a zope object to "reset" itself > >according to a modified class definition? > > You must locate the object and delete the instance level > attribute.
Thanks for the reply, Dieter. Through further exploration I discovered that they in fact *had* the correct meta_type. The problem I was experiencing was that when I called objectValues('New MetaType') on the object's parent, I didn't get anything back. It turns out that this method operates on a dictionary maintained in the parent rather than actually interrogating its children for their meta_type. So I'm now using my own version of objectValues and all is well in my application. It's an old version of zope (2.7.9), so I'm guessing that a patch would be a waste of time at this point, yes? > > > > -- > Dieter > _______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )