I have three entities: `Project`, `RequestMatcher`, and `Response`. Here is how they are related:

```
$project->getRequestMatchers(); // Project has many RequestMatchers

$requestMatcher->getActiveResponse(); // RequestMatcher has one active Response

```

How can i write DQL to get all active `Response`s for a `Project`? 

```
    $query = $this->getEntityManager()->createQuery(
        "SELECT resp FROM $responseClass resp
               JOIN $requestMatcherClass req WITH req.project = :project
               WHERE resp.id IN(req.active_response_id)"
    );

    $query->setParameter('project', $project);

```

I'm getting the following exception though: 

```
[Doctrine\ORM\Query\QueryException]                                 
  [Syntax Error] line 0, col 230: Error: Expected Literal, got 'req'

```

I've also tried this with the same result:

```
    $query = $this->getEntityManager()->createQuery(
        "SELECT resp FROM $responseClass resp
               LEFT JOIN resp.requestMatcher req WITH req.project = :project
               WHERE resp IN(req.activeResponse)"
    );

```

This is the sql that will give me the id's

```
select active_response_id from (
  select active_response_id from request_matchers where project_id = 1
) t

```