#1472: RawSql queries are improperly cached in the query cache
-----------------------------------+----------------------------------------
Reporter: chorizo | Owner: jwage
Type: defect | Status: new
Priority: minor | Milestone:
Component: Attributes | Version: 1.0
Keywords: | Has_test: 0
Mystatus: Pending Core Response | Has_patch: 1
-----------------------------------+----------------------------------------
The query cache uses getDql() to get the hash for the query. RawSql
doesn't have a getDql() method (and really doesn't have DQL). This causes
all RawSql quries to collide to the same query in the cache.
This is a patch to disable query caching in RawSql:
{{{
Index: lib/Doctrine-1.0.0/lib/Doctrine/RawSql.php
===================================================================
--- lib/Doctrine-1.0.0/lib/Doctrine/RawSql.php (revision 8301)
+++ lib/Doctrine-1.0.0/lib/Doctrine/RawSql.php (working copy)
@@ -38,6 +38,13 @@
*/
class Doctrine_RawSql extends Doctrine_Query_Abstract
{
+
+ function __construct(Doctrine_Connection $connection = null,
+ Doctrine_Hydrator_Abstract $hydrator = null) {
+ parent::__construct($connection, $hydrator);
+ $this->useQueryCache(false);
+ }
+
/**
* @var array $fields
*/
}}}
--
Ticket URL: <http://trac.doctrine-project.org/ticket/1472>
Doctrine <http://www.phpdoctrine.org>
PHP Doctrine Object Relational Mapper
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---