I want to execute a simple native query, but it does not work:
@Autowired private EntityManager em; Query q = em.createNativeQuery(\"SELECT count(*) FROM my
I use EclipseLink. This JPA allows the following way for the native queries:
Query q = em.createNativeQuery("SELECT * FROM mytable where username = ?username"); q.setParameter("username", "test"); q.getResultList();