'jpa stored procedure resultset type mapping

my stored procedure returns a table like below

no  |  name
------------
1   |  'tom'
2   |  'clark'
...
more rows....

and this colums has type like

no = int
name = varchar

it always map no column into int.
but, I want to get no with long not int

class Result {
  long no;
  String name;
}

like this pojo

how can I do this ?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source