bookmark

Native Queries - How to call native SQL queries with JPA


Description

Query q = em.createNativeQuery("SELECT a.firstname, a.lastname FROM Author a WHERE a.id = :id"); q.setParameter("id", 1); Object[] author = (Object[]) q.getSingleResult();

Preview

Tags

Users

  • @jil

Comments and Reviews