2007-09-02 14:24:49 +00:00
|
|
|
<?php
|
2008-05-13 21:20:34 +00:00
|
|
|
class SoftDeleteTest extends Doctrine_Entity
|
2007-09-02 14:24:49 +00:00
|
|
|
{
|
2008-02-03 21:29:57 +00:00
|
|
|
public static function initMetadata($class)
|
2007-09-02 14:24:49 +00:00
|
|
|
{
|
2008-02-03 21:29:57 +00:00
|
|
|
$class->setColumn('name', 'string', null, array('primary' => true));
|
|
|
|
$class->setColumn('something', 'string', '25', array('notnull' => true, 'unique' => true));
|
|
|
|
$class->setColumn('deleted', 'boolean', 1);
|
2007-09-02 14:24:49 +00:00
|
|
|
}
|
2008-03-17 13:26:34 +00:00
|
|
|
/*public function preDelete()
|
2007-09-02 14:24:49 +00:00
|
|
|
{
|
|
|
|
$event->skipOperation();
|
|
|
|
}
|
2008-03-17 13:26:34 +00:00
|
|
|
public function postDelete()
|
2007-09-02 14:24:49 +00:00
|
|
|
{
|
|
|
|
$this->deleted = true;
|
|
|
|
|
|
|
|
$this->save();
|
2008-03-17 13:26:34 +00:00
|
|
|
}*/
|
2007-09-02 14:24:49 +00:00
|
|
|
}
|