1
0
Fork 0
mirror of synced 2025-04-01 20:36:14 +03:00

Fixed query cache id generation: added platform to hash

This commit is contained in:
Antonio Vilar 2014-06-27 20:17:43 +02:00
parent 9e36a95a97
commit 0dde8585c3

View file

@ -682,8 +682,13 @@ final class Query extends AbstractQuery
{
ksort($this->_hints);
$platform = $this->getEntityManager()
->getConnection()
->getDatabasePlatform()
->getName();
return md5(
$this->getDql() . serialize($this->_hints) .
$this->getDql() . serialize($this->_hints) . $platform .
($this->_em->hasFilters() ? $this->_em->getFilters()->getHash() : '') .
'&firstResult=' . $this->_firstResult . '&maxResult=' . $this->_maxResults .
'&hydrationMode='.$this->_hydrationMode.'DOCTRINE_QUERY_CACHE_SALT'