Whenever you set an attribute on a Persistent
object, it get's saved to the ZODB (provided no exception triggered a transaction abort).
In the ZODB, objects really should have only one parent, and thus only one, canonical URL. It is not recommended that you try and make such objects appear to have multiple URLs, at least not by manipulating the __parent__
attribute.
Rather, you should provide a __resource_url__()
method to provide alternative URLs instead. You can use volatile attributes to store non-persistent information on your objects for such a method to use, perhaps.
Volatile attributes are any attribute starting with _v_
and are ignored by the persistence engine.