DDC-901: Docs DQL Custom Walkers CountSqlWalker example error #5428

Closed
doctrinebot opened this Issue Nov 29, 2010 · 2 comments

2 participants

@doctrinebot

Jira issue originally created by user cgmartin:

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 ...
@doctrinebot

Comment created by @beberlei:

Fixed

@doctrinebot

Issue was closed with resolution "Fixed"

@beberlei beberlei was assigned by doctrinebot Dec 6, 2015
@doctrinebot doctrinebot added this to the 2.0-RC2 milestone Dec 6, 2015
@doctrinebot doctrinebot closed this Dec 6, 2015
@doctrinebot doctrinebot added the Bug label Dec 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment