Created
June 22, 2016 09:44
-
-
Save tkfx/f98f17ed68b7c93392dfa303dddee818 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| EntityManager em = emf.createEntityManager(); | |
| em.getTransaction().begin(); | |
| Author a = em.find(Author.class, 1L); | |
| em.getTransaction().commit(); | |
| em.close(); | |
| log.info(a.getFirstName() + " " + a.getLastName() + " wrote "+a.getBooks().size() + " books."); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment