/** * {@inheritdoc} */ protected function _doExecute() { $executor = $this->_parse()->getSqlExecutor(); if ($this->_queryCacheProfile) { $executor->setQueryCacheProfile($this->_queryCacheProfile); } if ($this->_resultSetMapping === null) { $this->_resultSetMapping = $this->_parserResult->getResultSetMapping(); } // Prepare parameters $paramMappings = $this->_parserResult->getParameterMappings(); if (count($paramMappings) != count($this->parameters)) { throw QueryException::invalidParameterNumber(); } list($sqlParams, $types) = $this->processParameterMappings($paramMappings); return $executor->execute($this->_em->getConnection(), $sqlParams, $types); }
/** * {@inheritdoc} */ protected function _doExecute() { $executor = $this->_parse()->getSqlExecutor(); if ($this->_queryCacheProfile) { $executor->setQueryCacheProfile($this->_queryCacheProfile); } if ($this->_resultSetMapping === null) { $this->_resultSetMapping = $this->_parserResult->getResultSetMapping(); } // Prepare parameters $paramMappings = $this->_parserResult->getParameterMappings(); if (count($paramMappings) != count($this->parameters)) { throw QueryException::invalidParameterNumber(); } // evict all cache for the entity region if ($this->hasCache && isset($this->_hints[self::HINT_CACHE_EVICT]) && $this->_hints[self::HINT_CACHE_EVICT]) { $this->evictEntityCacheRegion(); } list($sqlParams, $types) = $this->processParameterMappings($paramMappings); return $executor->execute($this->_em->getConnection(), $sqlParams, $types); }