diff --git a/classes/Managed_DataObject.php b/classes/Managed_DataObject.php index 0857bb11f6..5b22672d7b 100644 --- a/classes/Managed_DataObject.php +++ b/classes/Managed_DataObject.php @@ -483,6 +483,8 @@ abstract class Managed_DataObject extends Memcached_DataObject throw new ServerException('DataObject must be the result of a query (N>=1) before updateWithKeys()'); } + $this->onUpdateKeys($orig); + // do it in a transaction $this->query('BEGIN'); @@ -580,6 +582,11 @@ abstract class Managed_DataObject extends Memcached_DataObject // NOOP by default } + protected function onUpdateKeys(Managed_DataObject $orig) + { + // NOOP by default + } + public function insert() { $this->onInsert();