-
-
Save doctrinebot/59eae5816b95e80c24a9 to your computer and use it in GitHub Desktop.
Attachments to Doctrine Jira Issue DDC-1026 - https://github.com/doctrine/doctrine2/issues/1616
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/Doctrine/ORM/AbstractQuery.php b/lib/Doctrine/ORM/AbstractQuery.php | |
index 5c7f074..e17e3f4 100644 | |
--- a/lib/Doctrine/ORM/AbstractQuery.php | |
+++ b/lib/Doctrine/ORM/AbstractQuery.php | |
@@ -522,7 +522,7 @@ abstract class AbstractQuery | |
return $result; | |
} else { | |
// Cache hit. | |
- return $cached[$id]; | |
+ return is_array($cached) ? $cached[$id]:$cached; | |
} | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -ur a/Doctrine/ORM/AbstractQuery.php b/Doctrine/ORM/AbstractQuery.php | |
--- a/Doctrine/ORM/AbstractQuery.php 1970-01-01 10:13:08.000000000 +0100 | |
+++ b/Doctrine/ORM/AbstractQuery.php 2011-02-24 16:23:58.000000000 +0000 | |
@@ -517,7 +517,7 @@ | |
$stmt, $this->_resultSetMapping, $this->_hints | |
); | |
- $cacheDriver->save($id, $result, $this->_resultCacheTTL); | |
+ $cacheDriver->save($id, array($id => $result), $this->_resultCacheTTL); | |
return $result; | |
} else { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment