Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: Git Master
-
Fix Version/s: 2.0-RC2
-
Component/s: Documentation
-
Security Level: All
-
Labels:None
Description
Getting invalid SQL when using the CountSqlWalker example in the DQL Custom Walkers docs:
SELECT count(DISTINCT z0_.) AS sclr0 FROM ...
From what looks like this part of the example:
...
$pathExpression = new PathExpression(
PathExpression::TYPE_STATE_FIELD | PathExpression::TYPE_SINGLE_VALUED_ASSOCIATION, $parentName, array(
$parent['metadata']->getSingleIdentifierFieldName())
);
...
If you move the field name (3rd parameter) out of the array, it seems to work:
...
$pathExpression = new PathExpression(
PathExpression::TYPE_STATE_FIELD | PathExpression::TYPE_SINGLE_VALUED_ASSOCIATION, $parentName,
$parent['metadata']->getSingleIdentifierFieldName()
);
...
SELECT count(DISTINCT z0_.id) AS sclr0 FROM ...