DDC-234: CLONE -createQueryBuilder does not insert alias into "from" part #3045

Closed
doctrinebot opened this Issue Jan 4, 2010 · 6 comments

2 participants

@doctrinebot

Jira issue originally created by user cloun:

When using createQueryBuilder() the dql created throws an error when executed:

Error: Expected Doctrine\ORM\Query\Lexer::T_IDENTIFIER, got 'LEFT'

The dql created is missing the alias after "from".

@doctrinebot

Comment created by cloun:

The same issue in trunk

@doctrinebot

Comment created by @guilhermeblanco:

You must define an alias for all situations (update and select queries included).

Closing ticket. If I made something wrong, reopen it and provide more informations.

Thanks

@doctrinebot

Comment created by cloun:

Thanks for fix, but it is not all. Please, look at EntityRepository->createQueryBuilder method. Specified alias is not pushed into 'from' method. I suggest:

public function createQueryBuilder($alias)
{
   return $this->_em->createQueryBuilder()
        ->select($alias)
        ->from($this->_entityName, $alias); //the second parameter lost
}
@doctrinebot

Comment created by @guilhermeblanco:

In r7006 this issue was fixed. Thanks for the clear report now... it saves quite some time =)
Also thanks for the patch!

Cheers,

@doctrinebot

Issue was closed with resolution "Fixed"

@doctrinebot

Comment created by cloun:

Thanks for fix =)

@doctrinebot doctrinebot added this to the 2.0-ALPHA4 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