I just observed something which I really wouldn't have expected. If I set a property on an object, via a PropertySheet, I then cannot add an object of the same id at the same level (and vice-versa). Say I have a folder, to which I add a property named 'draft'. Then I try to add any object (Page Template, whatever) with an id of 'draft' inside the folder. This fails with OFS.ObjectManager.checkValidId complaining that the id is already in use. Is this how it's supposed to work? This is on Zope 2.7.3-0, and I just verified it also is the case on Zope 2.7.6 final. Thanks in advance, Rob __________________________________ Discover Yahoo! Get on-the-go sports scores, stock quotes, news and more. Check it out! http://discover.yahoo.com/mobile.html
On Thu, Jun 02, 2005 at 12:05:00PM -0700, Rob Boyd wrote:
I just observed something which I really wouldn't have expected. If I set a property on an object, via a PropertySheet, I then cannot add an object of the same id at the same level (and vice-versa).
Yes. PropertyManager just stores properties as attributes. So they're in the same namespace as ObjectManager sub-objects. Arguably that's wrong, but this is the first time I've heard of anybody having a problem with it :-) -- Paul Winkler http://www.slinkp.com
--- Paul Winkler <pw_lists@slinkp.com> wrote:
On Thu, Jun 02, 2005 at 12:05:00PM -0700, Rob Boyd wrote:
I just observed something which I really wouldn't have expected. If I set a property on an object, via a PropertySheet, I then cannot add an object of the same id at the same level (and vice-versa).
Yes. PropertyManager just stores properties as attributes. So they're in the same namespace as ObjectManager sub-objects.
Arguably that's wrong, but this is the first time I've heard of anybody having a problem with it :-)
--
Paul Winkler
Thanks for the speedy reply. I ran into it because I have a CMF tool for organizations, which has valid org codes as properties, and contains organization objects. I was converting data from a relational database and wouldn't you know, there was an org code with the same name as an organization. So I guess I'll hack around by lowercasing the org ids, and letting the org code property ids be all caps. Rob __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
participants (2)
-
Paul Winkler -
Rob Boyd