1
0
mirror of synced 2025-02-01 04:51:45 +03:00

DDC-644 - Added missing code for the _getScalarRowData()

This commit is contained in:
Benjamin Eberlei 2010-07-28 21:57:05 +02:00
parent 553e93ae27
commit 56b3c0e8b0
2 changed files with 9 additions and 0 deletions

View File

@ -249,6 +249,10 @@ abstract class AbstractHydrator
$cache[$key]['fieldName'] = $fieldName; $cache[$key]['fieldName'] = $fieldName;
$cache[$key]['type'] = Type::getType($classMetadata->fieldMappings[$fieldName]['type']); $cache[$key]['type'] = Type::getType($classMetadata->fieldMappings[$fieldName]['type']);
$cache[$key]['dqlAlias'] = $this->_rsm->columnOwnerMap[$key]; $cache[$key]['dqlAlias'] = $this->_rsm->columnOwnerMap[$key];
} else if (!isset($this->_rsm->metaMappings[$key])) {
// this column is a left over, maybe from a LIMIT query hack for example in Oracle or DB2
// maybe from an additional column that has not been defined in a NativeQuery ResultSetMapping.
continue;
} else { } else {
// Meta column (has meaning in relational schema only, i.e. foreign keys or discriminator columns). // Meta column (has meaning in relational schema only, i.e. foreign keys or discriminator columns).
$cache[$key]['isMetaColumn'] = true; $cache[$key]['isMetaColumn'] = true;

View File

@ -297,6 +297,11 @@ class QueryTest extends \Doctrine\Tests\OrmFunctionalTestCase
$this->assertEquals(2, count($data)); $this->assertEquals(2, count($data));
$this->assertEquals('gblanco3', $data[0]->username); $this->assertEquals('gblanco3', $data[0]->username);
$this->assertEquals('gblanco4', $data[1]->username); $this->assertEquals('gblanco4', $data[1]->username);
$data = $this->_em->createQuery('SELECT u FROM Doctrine\Tests\Models\CMS\CmsUser u')
->setFirstResult(3)
->setMaxResults(2)
->getScalarResult();
} }
public function testSupportsQueriesWithEntityNamespaces() public function testSupportsQueriesWithEntityNamespaces()