Author: jwage
Date: 2008-09-08 19:59:05 +0100 (Mon, 08 Sep 2008)
New Revision: 4884
Modified:
branches/1.0/lib/Doctrine/Record.php
Log:
fixes #1435
Modified: branches/1.0/lib/Doctrine/Record.php
===================================================================
--- branches/1.0/lib/Doctrine/Record.php 2008-09-08 18:56:18 UTC (rev
4883)
+++ branches/1.0/lib/Doctrine/Record.php 2008-09-08 18:59:05 UTC (rev
4884)
@@ -622,6 +622,7 @@
$event = new Doctrine_Event($this, Doctrine_Event::RECORD_SERIALIZE);
$this->preSerialize($event);
+ $this->getTable()->getRecordListener()->preSerialize($event);
$vars = get_object_vars($this);
@@ -655,6 +656,7 @@
$str = serialize($vars);
$this->postSerialize($event);
+ $this->getTable()->getRecordListener()->postSerialize($event);
return $str;
}
@@ -670,9 +672,7 @@
public function unserialize($serialized)
{
$event = new Doctrine_Event($this, Doctrine_Event::RECORD_UNSERIALIZE);
-
- $this->preUnserialize($event);
-
+
$manager = Doctrine_Manager::getInstance();
$connection = $manager->getConnectionForComponent(get_class($this));
@@ -680,6 +680,9 @@
self::$_index++;
$this->_table = $connection->getTable(get_class($this));
+
+ $this->preUnserialize($event);
+ $this->getTable()->getRecordListener()->preUnserialize($event);
$array = unserialize($serialized);
@@ -710,6 +713,7 @@
$this->prepareIdentifiers($this->exists());
$this->postUnserialize($event);
+ $this->getTable()->getRecordListener()->postUnserialize($event);
}
/**
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"doctrine-svn" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.co.uk/group/doctrine-svn?hl=en-GB
-~----------~----~----~----~------~----~------~--~---