EclipseLink natywny wynik zapytania do POJO - Brakujący deskryptor dla [Class]
Używam EclipseLink do uruchamiania rodzimego SQL. Muszę zwrócić dane do POJO. Postępowałem zgodnie z instrukcjami pod adresemDokumenty EclipseLink, ale otrzymuję błądMissing descriptor for [Class]
Kolumny zapytań zostały nazwane tak, aby pasowały do zmiennych członkowskich POJO. Czy muszę zrobić dodatkowe mapowanie?
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
Połączenie menedżera jednostki:
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();
}