I have a standard SQL query that is used to create a class Project. Project also contains class ProjectParticipant. That same query fetches all data for both Project and ProjectParticipant, So first I create new ProjectParticipant() all fill the attributes. then I create Project, add attribute sand add ProjectParticipant, I would like to do the same with JPA.
With one query/criteria:
- create class ProjectParticipant
- fill it with data
- use method construct() for/with Project
- fill data for Project
- add ProjectParticipant to Project.
Currently my JPA criteria solution is to have all attributes from Member in project (and no Memeber object).
All i have read on CriteriaBuilder.construct() uses String, Integers...