sql request with jpa hiberna

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

we are a community of more than 2 million smartest coders
registration for
employee referral programs
are now open
get referred to google, amazon, flipkart and more
register now
  
pinned-register now
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