Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Blocker
-
Resolution: Unresolved
-
Affects Version/s: 1.2.2
-
Fix Version/s: None
-
Component/s: Record
-
Labels:None
Description
Doctrine result cache isn't working properly.
Here a simple example, when I'm calling query->execute (); parentProgram is related to a video.
Into the Doctrine_Query_Abstract.php file
line 1014 : I have just add some code to output data.
[code]
if ($cached === false)
else
{ $result = $this->_constructQueryFromCache($cached); $oVideo = $result[0]; echo "cached "; var_dump (count ($oVideo->parentProgram->getReferences ())); exit (0); }[/code]
The output of a query execution (the first with an empty APC cache) with "useResultCache" is :
- not cached int(1)
- cached int(0)
The problem is coming from the serialize php function that can't serialize protected properties..
getReferences is a getter to a protected property.. So data result can't work properly.
A solution could be use __sleep function, and a public property that contain all important protected data.