Merge branch 'DDC-3018' into 2.4
This commit is contained in:
commit
333fa1090a
@ -1497,6 +1497,7 @@ class SqlWalker implements TreeWalker
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$fieldType = 'string';
|
||||||
switch (true) {
|
switch (true) {
|
||||||
case ($e instanceof AST\PathExpression):
|
case ($e instanceof AST\PathExpression):
|
||||||
$fieldName = $e->field;
|
$fieldName = $e->field;
|
||||||
@ -1517,10 +1518,6 @@ class SqlWalker implements TreeWalker
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
|
||||||
$fieldType = 'string';
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->scalarResultAliasMap[$resultAlias] = $columnAlias;
|
$this->scalarResultAliasMap[$resultAlias] = $columnAlias;
|
||||||
|
@ -592,12 +592,20 @@ class LanguageRecognitionTest extends \Doctrine\Tests\OrmTestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @gorup DDC-1858
|
* @group DDC-1858
|
||||||
*/
|
*/
|
||||||
public function testHavingSupportIsNullExpression()
|
public function testHavingSupportIsNullExpression()
|
||||||
{
|
{
|
||||||
$this->assertValidDQL("SELECT u.name FROM Doctrine\Tests\Models\CMS\CmsUser u HAVING u.username IS NULL");
|
$this->assertValidDQL("SELECT u.name FROM Doctrine\Tests\Models\CMS\CmsUser u HAVING u.username IS NULL");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @group DDC-3018
|
||||||
|
*/
|
||||||
|
public function testNewLiteralExpression()
|
||||||
|
{
|
||||||
|
$this->assertValidDQL("SELECT new " . __NAMESPACE__ . "\\DummyStruct(u.id, 'foo', 1, true) FROM Doctrine\Tests\Models\CMS\CmsUser u");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @Entity */
|
/** @Entity */
|
||||||
@ -617,3 +625,10 @@ class DQLKeywordsModelGroup
|
|||||||
/** @Column */
|
/** @Column */
|
||||||
private $from;
|
private $from;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class DummyStruct
|
||||||
|
{
|
||||||
|
public function __construct($id, $arg1, $arg2, $arg3)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user