I want to map my query result to RequestProjection interface values.
The following code works and return request id and submission date.
I need to return worker name too. I have tried r.worker_name AS workerName and r.worker_name AS worker_name and r.worker_name AS worker.name but none of them works.
How can I select and map worker name?
Query:
SELECT r.id AS id, r.submission_date AS submissionDate
From Request r
WHERE r.id = 1
Projection:
public interface RequestProjection {
    Long getId();
    Long getSubmissionDate();
    Worker getWorker();
    interface Worker {
        String getName();
    }
}
 
    