added a comment - - edited
I'm not even sure if this functionality should exist, but the problem was that the error came up as a function call to a method that did not exist!
Anyway, the dql would be something like this:
SELECT a FROM Address a WHERE a.User = :user
where user is a user object (ManyToOne)
If this functionality were to exist, I guess it could simply replicate this dql:
SELECT a FROM Address a WHERE a.User.id = :userId
The reason this was a problem for us at the time, was that we did not know that the second option was available, and since it is not possible to define column names AND relations, we couldn't figure out how to run a simple query that included a relation. It turned out that I figured out that option 2 (above) was valid, and that's the route we went down
Of course we had no reason to beleive that another option existed, since the only error presented to us was a PHP fatal error telling us that the function Doctrine\ORM\Query\SqlWalker::walkSingleValuedAssociationPathExpression() did not exist.
Either this could be implemented, or an exception thrown, rather than Doctrine trying to trigger a function that has not been implemented :o)
Edit: I should have used a ManyToOne example since that was the code we used