Last active
July 6, 2016 02:47
-
-
Save thjanssen/3f2cb5bd0705b82170fce6c957d9f68a 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
PersonEntity p = em.find(PersonEntity.class, 1L); | |
log.info("Detach PersonEntity"); | |
em.flush(); | |
em.detach(p); | |
em.createNativeQuery("UPDATE person p SET firstname = firstname || '-changed'").executeUpdate(); | |
p = em.find(PersonEntity.class, 1L); |
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
em.createNativeQuery("UPDATE person p SET firstname = firstname || '-changed'").executeUpdate(); |
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
PersonEntity p = em.find(PersonEntity.class, 1L); | |
em.createNativeQuery("UPDATE person p SET firstname = firstname || '-changed'").executeUpdate(); | |
log.info("FirstName: "+p.getFirstName()); | |
p = em.find(PersonEntity.class, 1L); | |
log.info("FirstName: "+p.getFirstName()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment