假设我有这两个 bean 实体:
public class Audit {
private String code;
private java.sql.Timestamp creationDate;
private String creatorId;
private java.sql.Timestamp deletionDate;
private String description;
private String id;
private String name;
private String notes;
private Short status;
private List<AuditParticipant> participants;
}
和 :
public class AuditParticipant {
private String auditId;
private String department;
private String id;
private String name;
private String notes;
private String role;
private String surname;
}
... 哪里Audit
可以有 1..n Participants
,我如何使用 QueryDSL SQL 将参与者列表投影到 Audit bean 中(获取属于审计的所有参与者)?
bean 是使用 QueryDSL 代码生成生成的。
谢谢