/** * Reconnect primary table row to database after unserializing. * * @return void */ public function __wakeup() { if (false === is_null($this->_primaryTableRow)) { $tableclass = $this->_primaryTableRow->getTableClass(); $table = Opus_Db_TableGateway::getInstance($tableclass); $this->_primaryTableRow->setTable($table); } }