function preSave() { if ($this->getDeleted() == TRUE) { //Delete (for real) any already deleted rows in hopes to prevent a //unique index conflict across user_id,date_stamp,deleted $udlf = new UserDateListFactory(); $udlf->deleteByUserIdAndDateAndDeleted($this->getUser(), $this->getDateStamp(), TRUE); } return TRUE; }