Собственный результат запроса EclipseLink в POJO - отсутствует дескриптор для [Class]
Я использую EclipseLink для запуска собственного Native SQL. Мне нужно вернуть данные в POJO. Я следовал инструкциям наEclipseLink Docsно я получаю ошибкуMissing descriptor for [Class]
Столбцы запроса были названы так, чтобы соответствовать переменным-членам POJO. Нужно ли мне делать некоторые дополнительные сопоставления?
POJO:
public class AnnouncementRecipientsFlattenedDTO {
private BigDecimal announcementId;
private String recipientAddress;
private String type;
public AnnouncementRecipientsFlattenedDTO() {
super();
}
public AnnouncementRecipientsFlattenedDTO(BigDecimal announcementId, String recipientAddress, String type) {
super();
this.announcementId = announcementId;
this.recipientAddress = recipientAddress;
this.type = type;
}
... Getters/Setters
Вызов Entity Manager:
public List<AnnouncementRecipientsFlattenedDTO> getNormalizedRecipientsForAnnouncement(int announcementId) {
Query query = em.createNamedQuery(AnnouncementDeliveryLog.FIND_NORMALIZED_RECIPIENTS_FOR_ANNOUNCEMENT, AnnouncementRecipientsFlattenedDTO.class);
query.setParameter(1, announcementId);
return query.getResultList();
}