0

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:

  1. create class ProjectParticipant
  2. fill it with data
  3. use method construct() for/with Project
  4. fill data for Project
  5. 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...

  • Maybe I don't understand what you're trying to do, but why don't you simply create the objects and call `EntityManager#persist()`? – DannyMo Oct 22 '13 at 22:49
  • I wasnt clear. This is for reports, and I would be unwise to persist alla data contined in a report... – asaguden Oct 31 '13 at 16:17

0 Answers0