Я использую Hibernate для выполнения моего запроса, в административной панели я получаю правильный результат, но при использовании в Hibernate он не дает никакого результата.
Слой Dao -
@Query("select new com.eventila.pms.entity.ReferenceLead(projectId,count(lm)) from LeadMaster lm where lm.vendorId= ?1 and lm.source = 'share' group by lm.projectId")
List<ReferenceLead> getReferenceByUser(String userId);
Pojo -
@lombok.Data
@JsonInclude(JsonInclude.Include.NON_NULL)
public class ReferenceLead {
String projectId;
Long referenceLead;
Long count;
protected ReferenceLead(){}
public ReferenceLead(String projectId,Long count) {
this.projectId=projectId;
this.count=count;
}
}
После выполнения этого я получаю пустой список. Пожалуйста, помогите мне.