Can you join on a subquery with Doctrine 2 DQL?
问题 Is there a way to access a joined entity's relation in the WITH clause of a join? Im trying to avoid using an IN clause with a subquery. Edit: Or is there a way to join on a subquery rather than using IN ? i.e. Making sure the joined object's t.final value is 1. Trying to Avoid This Query SELECT o FROM Entity\Order o WHERE o.status = :orderStatus AND o.id NOT IN ( SELECT o2.id FROM Entity\ServiceRequest s JOIN s.order o2 JOIN s.serviceType t WHERE s.status = :serviceStatus AND t.final = 1 )