DDC-1227: On 2.1 upgrade QueryBuilder incompatability getAlias() when using ''->add('select', 'sample')->add('from', 'Samply sample') instead of ->select('sample')->from('Sample', 'sample') #1835

Closed
doctrinebot opened this Issue Jun 23, 2011 · 3 comments

2 participants

@doctrinebot

Jira issue originally created by user pleicht:

In queryBuilder if I use the add function when adding components to the query I get an error like this :

Fatal error: Call to a member function getAlias() on a non-object in /usr/local/zend/share/pear/Doctrine/ORM/QueryBuilder.php on line 989

sample code is

$this->em->createQueryBuilder()
            ->add('select', 'sample')
            ->add('from', 'Sample sample')
            ->getQuery()
            ->execute()

it works with the following:

$this->em->createQueryBuilder()
            ->select('sample')
            ->from('Sample', 'sample')
            ->getQuery()
            ->execute()

I apologize if this is a duplicate ticket. I would like to see this fixed in the final release of 2.1 before installing it in our production environment.

@doctrinebot

Comment created by @beberlei:

Formatting

@doctrinebot

Comment created by @beberlei:

Fixed, thanks! You qualify for a mug/t-shirt after 2.1 release :)

@doctrinebot

Issue was closed with resolution "Fixed"

@beberlei beberlei was assigned by doctrinebot Dec 6, 2015
@doctrinebot doctrinebot added this to the 2.1 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