The below approach to get a Spring Data Projection from a JPA Query doesn\'t work for me:
https://stackoverflow.com/a/45443776/1005607
My table:
I encounter the same problem. After try several changes, I found we just need to add "as" for each column(even the column name is not changed) in NativeQuery. For you here, change your sql like :
@Query("select a.activityTitle **as activityTitle**, l.description as category, " +
"l.displayOrderNum as categoryDisplayOrderNum " +
"from ActivitiesT a, LookupT l " +
"where a.lookupT.id = l.id order by l.displayOrderNum asc ")