How to use Non-entity result class for Native query in CUBA

Hi,

I am trying to map the result set into a non-entity(Entity is not available but custom getter and setter method is created) in middle-ware and getting the below error:
java.lang.IllegalArgumentException: Non-entity result class for native query is not supported by EclipseLink:

can you suggest how to use the same?

Thanks in advance.
Regards,
Velankanni J

Hi,
As stated in the message, mapping a native query results to a POJO is impossible because EclipseLink just doesn’t do it. So either make an entity, or map the result list manually.

1 Like

Hi,

Okay… Thanks :slight_smile: