Hi Thomas,

I don't see any obvious mistakes in your query - did you validate your
mappings first?

What is the exact version of doctrine/orm in your `composer.lock`?


Marco Pivetta

http://twitter.com/Ocramius

http://ocramius.github.com/


On 5 February 2014 11:05, Thomas Lundquist <[email protected]>wrote:

>
> Hello group.
>
>
> I have this little query in a repo:
>
>  -- snip --
>
>         $dql = <<<EODQL
> SELECT f
> FROM Foo\BarBundle\Entity\Frog f
> WHERE
> f.id in (
>     SELECT distinct(i.frog)
>     FROM NTE\InventoryBundle\Entity\Item i
>     WHERE i.function = :itemfunction
>     )
> EODQL;
>
> $q = $this->_em->createQuery($dql);
> $q->setParameter('itemfunction', $itemfunction);
>
> return $q->getResult();
>
>  -- snip --
>
> When there are no items with the itemfunction from the sub select, I end up
> with these two:
>
> PHP Warning:  Illegal offset type in
>  doctrine/orm/lib/Doctrine/ORM/Query/SqlWalker.php on line 601,
>
> And
>
> PHP Fatal error:  Call to a member function getTableName() on a non-object
> in
> doctrine/orm/lib/Doctrine/ORM/Query/SqlWalker.php on line 602
>
>
> Doctrine version (from composer.lock):
>
> "name": "doctrine/dbal",
> "version": "v2.4.2",
>
> Symfony 2.4.1 (If that's of any interest)
>
> So, is this just the stupid and wrong way to query or a bug?
>
> Doing (well, close) this in SQL gives 0 rows and no error.
>
>
> Thomas.
>
> --
> You received this message because you are subscribed to the Google Groups
> "doctrine-user" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/doctrine-user.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
You received this message because you are subscribed to the Google Groups 
"doctrine-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/doctrine-user.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to