Skip to content

Instantly share code, notes, and snippets.

@kevingo
Created June 14, 2012 07:28
Show Gist options
  • Save kevingo/2928730 to your computer and use it in GitHub Desktop.
Save kevingo/2928730 to your computer and use it in GitHub Desktop.
JPA - createNativeQuery
Query q = JPA.em().createNativeQuery("SELECT * from post p");
List<Post> posts = (List<Post>)q.getResultList();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment