Created
August 29, 2016 17:58
-
-
Save david-oc-miller/07927b2bee469a035721898f8210b30a 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
| public class SaveItemService | |
| { | |
| @PersistenceContext | |
| private EntityManager em; | |
| @Transactional(propagation = Propagation.REQUIRED) | |
| public Item save(Item toSave) | |
| { | |
| Item saved = em.merge(toSave); | |
| return saved; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment