1
0
mirror of synced 2024-12-13 22:56:04 +03:00

[2.0][DDC-458] Fixed issue with IN () support when providing numeric values separated by comma without spaces.

This commit is contained in:
guilhermeblanco 2010-03-23 17:42:34 +00:00
parent fcbe01f800
commit b175427043
2 changed files with 6 additions and 1 deletions

View File

@ -124,7 +124,7 @@ class Lexer extends \Doctrine\Common\Lexer
{
return array(
'[a-z_][a-z0-9_\:\\\]*[a-z0-9_]{1}',
'(?:[0-9]+(?:[,\.][0-9]+)*)(?:e[+-]?[0-9]+)?',
'(?:[0-9]+(?:[\.][0-9]+)*)(?:e[+-]?[0-9]+)?',
"'(?:[^']|'')*'",
'\?[1-9][0-9]*|:[a-z][a-z0-9_]+'
);

View File

@ -123,6 +123,11 @@ class LanguageRecognitionTest extends \Doctrine\Tests\OrmTestCase
{
$this->assertValidDql('SELECT u FROM Doctrine\Tests\Models\CMS\CmsUser u WHERE u.id IN (1, 2)');
}
public function testInExpressionWithoutSpacesSupportedInWherePart()
{
$this->assertValidDql('SELECT u FROM Doctrine\Tests\Models\CMS\CmsUser u WHERE u.id IN (1,2,3)');
}
public function testNotInExpressionSupportedInWherePart()
{