sql request with jpa hiberna

Solutions on MaxInterview for sql request with jpa hiberna by the best coders in the world

showing results for - "sql request with jpa hiberna"
Chiara
21 Nov 2016
1Query q = em.createNativeQuery("SELECT a.firstname, a.lastname FROM Author a");
2List<Object[]> authors = q.getResultList();
3 
4for (Object[] a : authors) {
5    System.out.println("Author "
6            + a[0]
7            + " "
8            + a[1]);
9}
10