If I have one of my PHP Doctrine objects act like SoftDelete, is it possible to include deleted elements in the results of certain queries? I'm looking for something like this ...
$q = Doctrine_Query::create()
->select('*')
->from('Test t')
->where('id < ?', 25)
*->includeDeleted()*;
Something like this would be useful, since for most requests I want deleted entries to be excluded, but sometimes (for administrators, for example) I want to be able to include entries that were gently deleted. Is there a good way to do this with SoftDelete, or just add an extra where clause to most queries?
source
share