Tuesday, June 28, 2005

[Opf3] Deleting related objects

A few people have been asking me about the way how Opf3 deletes related objects from the storage.

The quick answer: it doesn't.

The longer answer:
The framework does not delete the related objects because this would mean to load them all into memory, mark them for deletion and then delete them. That costs a lot time and is not praticable.

How to have related object deleted then?
We suggest to mark the relation in the storage with a "cascade delete". This means that the related objects are deleted when the parent object is deleted. We think that using "cascade delete" is the best way of doing it, because it's very fast as it is done by the storage.


Post a Comment

<< Home