Thanks, Gordon.
Yes. It's an entity. But can I have it not as an entity if possible,
because it is just for a tempoary holder not really for persistence?
I also try the 'resultSetMapping' but also got a different EclipseLink
exception.
Surprisingly, I could not find anything like what I'm trying to achieve
after googling several days.
@NamedNativeQuery(name = "findIds", query = "select min(id) as minKey,
max(id) as maxKey from account",
resultSetMapping = "KeyRange")
@Entity
public class KeyRange {
String type;
long min;
long max;