My question is somewhat related to this querydsl Tuple
Here, Data from a table employee
is being fetched. In my use case I have a child table called projects
which is having one to many relation with employee
table. Eg: employee A can have 3 projects say X, Y, Z. To model this, I have a Employee
class with List<Project>
as a member variable.
Now, I want to select the employee name and all the project that belong to them. What modification I need to make in the query that is shared in the link mentioned above.
In terms of SQL I am interested in fetching following.
SELLECT EMP.EMPLOYEE_NAME, PRJ.PROJECT_NAME FROM EMPLOYEE EMP, PROJECT PRJ WHERE EMP.EMP_ID = PRJ.EMP_ID;
Any easy to understand documentation on this topic will also be very helpful.