[Zope] referential integrity

Dieter Maurer dieter@handshake.de
Sat, 22 Sep 2001 00:26:51 +0200 (CEST)


Lukas Maag writes:
 > In other words, is it possible to store only a reference of an object in a attribute
 > of another object.
That's easy!

  You use a string values property and store the path to the referenced
  object.

 > Additionally, the zope database wouldn't allow to delete
 > the referenced object while it's still referenced (in a attribute of another
 > object).
Zope does not support that directly.
But you can use a ZCatalog to record the relation.
I case, you are deleting something, you ask the catalog
whether the object is still needed and reject deletion
when it is still in use.


Dieter