Fixed DDC-217, the result cache is caching the sql result #87

Closed
wants to merge 2 commits into
from

Conversation

Projects
None yet
3 participants

No description provided.

@stof stof commented on an outdated diff Jul 22, 2011

lib/Doctrine/ORM/AbstractQuery.php
return $result;
} else {
// Cache hit.
- return $cached[$key];
+
+ $this->_doExecute(FALSE/*do not execute the db call*/);
+ $stmtMock = new PDOMock($cached[$key]);
+
+ $result = $this->_em->getHydrator($this->_hydrationMode)->hydrateAll(
+ $stmtMock, $this->_resultSetMapping, $this->_hints
+ );
+
+ return $result;
@stof

stof Jul 22, 2011

Member

The indentation is wrong here

@stof stof commented on an outdated diff Jul 22, 2011

lib/Doctrine/ORM/AbstractQuery.php
return $result;
} else {
// Cache hit.
- return $cached[$key];
+
+ $this->_doExecute(FALSE/*do not execute the db call*/);
@stof

stof Jul 22, 2011

Member

Doctrine uses a lowercased false

@stof stof commented on the diff Jul 22, 2011

lib/Doctrine/ORM/AbstractQuery.php
* @return Doctrine\DBAL\Driver\Statement The executed database statement that holds the results.
*/
- abstract protected function _doExecute();
+ abstract protected function _doExecute($executeDbCall = TRUE);
@stof

stof Jul 22, 2011

Member

same here for true

@stof stof commented on an outdated diff Jul 22, 2011

lib/Doctrine/ORM/Query.php
@@ -53,15 +53,6 @@ final class Query extends AbstractQuery
* @var string
*/
const HINT_REFRESH = 'doctrine.refresh';
-
-
- /**
- * Internal hint: is set to the proxy entity that is currently triggered for loading
- *
- * @var string
- */
- const HINT_REFRESH_ENTITY = 'doctrine.refresh.entity';
@stof

stof Jul 22, 2011

Member

why are you removing this constant ?

Owner

guilhermeblanco commented Dec 19, 2011

Already fixed

@beberlei beberlei added a commit that referenced this pull request Jan 23, 2013

@beberlei beberlei Merge pull request #87 from FabioBatSilva/patch-6
docs for association/attribute override
390fbd8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment