I didn't notice it was the inversed side, sorry!

You could try this:

    SELECT f FROM Foo f LEFT JOIN f.bar b WHERE b.id IS NULL

Maybe even this will work (but I'm not sure):

    SELECT f FROM Foo f LEFT JOIN f.bar b WHERE b IS NULL

--  
Jasper N. Brouwer
(@jaspernbrouwer)


On 5 August 2014 at 17:35:46, Sander Marechal ([email protected]) wrote:
> On 08/05/2014 04:56 PM, Nima Sadjadi wrote:
> > What is the error message exactly?
>  
> Ah, sorry:
>  
> Doctrine\ORM\Quer\QueryException:
> A single-valued association path expression to an inverse side is not
> supported in DQL queries. Use an explicit join instead.
>  
> For now I've worked around it by doing:
>  
> SELECT f FROM Foo f
> LEFT JOIN f.bar b
> GROUP BY f.id
> HAVING COUNT(b.id) = 0
>  
> --
> Sander


-- 
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/d/optout.

Reply via email to