Is there a way to chain the preDelete() events in Symfony 1.4?
I have two tables: one master and one slave. In schema.yml I have defined them so that the slave records CASCADE the Deletion when a master record gets deleted.
But also, the slave deletion process needs to run some preprocessing which I'm intending to code in the preDelete event method of the slave record definition.
If I delete the slave record alone, I can get to this preDelete() event but if I delete the slave record through the master record, I only access to the preDelete() event in the master record definition. Can I access the preDelete event in the slave by the way of the master one?
Relevant code follows:
schema.yml
Master:
relations:
Slave:
Slave:
relations:
Master:
onDelete: CASCADE
lib/model/doctrine/Master.class.php
class Master extends BaseMaster
{
public function preDelete($event)
{
//master predelete processing...
}
}
lib/model/doctrine/Slave.class.php
class Slave extends BaseSlave
{
public funcion preDelete($event)
{
//slave predelete processing...
}
}