1
0
mirror of synced 2025-02-20 22:23:14 +03:00

Merge pull request #1075 from vilartoni/master

Fixed query cache id generation: added platform to hash
This commit is contained in:
Marco Pivetta 2014-06-27 22:37:36 +02:00
commit c370426792

View File

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