I gently delete objects in a MySQL database and using Propel ORM. I got a soft delete to work, but due to the loss of my forced parent-child relationship, since the actual rows are not deleted.
Is there any way for Propel to find out that the record was gently deleted when accessing it, so that a null-reference exception is not thrown? Thus, although the parent has been deleted, its child can still read its relationship, but when the child is updated or a new child is created, the remote parent is not available.
For instance,
The book has an AuthorId, and if an author owned by AuthorId is gently removed, then:
$book->getAuthor();
will return the correct author (view only). However, if a new book has been added, an author who has been gently deleted is not available for selection.
Does anyone know if this feature is built into Propel?
source
share