Merge pull request #688 from sellingsource/master
Implement QuoteStrategy on SqlWalker walkRangeVariableDeclaration
This commit is contained in:
commit
6ef48561ba
@ -844,7 +844,7 @@ class SqlWalker implements TreeWalker
|
|||||||
|
|
||||||
$this->rootAliases[] = $dqlAlias;
|
$this->rootAliases[] = $dqlAlias;
|
||||||
|
|
||||||
$sql = $class->getQuotedTableName($this->platform) . ' '
|
$sql = $this->quoteStrategy->getTableName($class,$this->platform) . ' '
|
||||||
. $this->getSQLTableAlias($class->getTableName(), $dqlAlias);
|
. $this->getSQLTableAlias($class->getTableName(), $dqlAlias);
|
||||||
|
|
||||||
if ($class->isInheritanceTypeJoined()) {
|
if ($class->isInheritanceTypeJoined()) {
|
||||||
@ -875,7 +875,7 @@ class SqlWalker implements TreeWalker
|
|||||||
$relation = $this->queryComponents[$joinedDqlAlias]['relation'];
|
$relation = $this->queryComponents[$joinedDqlAlias]['relation'];
|
||||||
$targetClass = $this->em->getClassMetadata($relation['targetEntity']);
|
$targetClass = $this->em->getClassMetadata($relation['targetEntity']);
|
||||||
$sourceClass = $this->em->getClassMetadata($relation['sourceEntity']);
|
$sourceClass = $this->em->getClassMetadata($relation['sourceEntity']);
|
||||||
$targetTableName = $targetClass->getQuotedTableName($this->platform);
|
$targetTableName = $this->quoteStrategy->getTableName($targetClass,$this->platform);
|
||||||
|
|
||||||
$targetTableAlias = $this->getSQLTableAlias($targetClass->getTableName(), $joinedDqlAlias);
|
$targetTableAlias = $this->getSQLTableAlias($targetClass->getTableName(), $joinedDqlAlias);
|
||||||
$sourceTableAlias = $this->getSQLTableAlias($sourceClass->getTableName(), $associationPathExpression->identificationVariable);
|
$sourceTableAlias = $this->getSQLTableAlias($sourceClass->getTableName(), $associationPathExpression->identificationVariable);
|
||||||
@ -930,7 +930,7 @@ class SqlWalker implements TreeWalker
|
|||||||
// Join relation table
|
// Join relation table
|
||||||
$joinTable = $assoc['joinTable'];
|
$joinTable = $assoc['joinTable'];
|
||||||
$joinTableAlias = $this->getSQLTableAlias($joinTable['name'], $joinedDqlAlias);
|
$joinTableAlias = $this->getSQLTableAlias($joinTable['name'], $joinedDqlAlias);
|
||||||
$joinTableName = $sourceClass->getQuotedJoinTableName($assoc, $this->platform);
|
$joinTableName = $this->quoteStrategy->getJoinTableName($assoc, $sourceClass, $this->platform);
|
||||||
|
|
||||||
$conditions = array();
|
$conditions = array();
|
||||||
$relationColumns = ($relation['isOwningSide'])
|
$relationColumns = ($relation['isOwningSide'])
|
||||||
|
@ -1846,6 +1846,17 @@ class SelectSqlGenerationTest extends \Doctrine\Tests\OrmTestCase
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @group DDC-1845
|
||||||
|
*/
|
||||||
|
public function testQuotedTableDeclaration()
|
||||||
|
{
|
||||||
|
$this->assertSqlGeneration(
|
||||||
|
'SELECT u FROM Doctrine\Tests\Models\Quote\User u',
|
||||||
|
'SELECT q0_."user-id" AS userid0, q0_."user-name" AS username1 FROM "quote-user" q0_'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @group DDC-1845
|
* @group DDC-1845
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user