Merge branch 'DDC-1091'
This commit is contained in:
commit
b5520aa304
@ -2308,7 +2308,8 @@ class Parser
|
|||||||
if ($peek['value'] == '.') {
|
if ($peek['value'] == '.') {
|
||||||
return $this->StateFieldPathExpression();
|
return $this->StateFieldPathExpression();
|
||||||
} else if ($peek['value'] == '(') {
|
} else if ($peek['value'] == '(') {
|
||||||
return $this->FunctionsReturningStrings();
|
// do NOT directly go to FunctionsReturningString() because it doesnt check for custom functions.
|
||||||
|
return $this->FunctionDeclaration();
|
||||||
} else {
|
} else {
|
||||||
$this->syntaxError("'.' or '('");
|
$this->syntaxError("'.' or '('");
|
||||||
}
|
}
|
||||||
|
@ -482,6 +482,16 @@ class LanguageRecognitionTest extends \Doctrine\Tests\OrmTestCase
|
|||||||
$this->assertValidDQL('SELECT u, u.id + ?1 AS someNumber FROM Doctrine\Tests\Models\CMS\CmsUser u');
|
$this->assertValidDQL('SELECT u, u.id + ?1 AS someNumber FROM Doctrine\Tests\Models\CMS\CmsUser u');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @group DDC-1091
|
||||||
|
*/
|
||||||
|
public function testCustomFunctionsReturningStringInStringPrimary()
|
||||||
|
{
|
||||||
|
$this->_em->getConfiguration()->addCustomStringFunction('CC', 'Doctrine\ORM\Query\AST\Functions\ConcatFunction');
|
||||||
|
|
||||||
|
$this->assertValidDQL("SELECT u FROM Doctrine\Tests\Models\CMS\CmsUser u WHERE CC('%', u.name) LIKE '%foo%'", true);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @group DDC-505
|
* @group DDC-505
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user