Guest User

Untitled

a guest
Sep 22nd, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. @Transactional
  2. public ResponseType methodA(UserObject userObject) {
  3. //save call
  4. jpaRepoObject.save(userObject);
  5. //next call will fail due to relational constraints on database
  6. jpaRepoObject.save(userObject); //should throw PSQLException/DataViolationException
  7.  
  8. return new ResponseType("success"); //Error thrown after this line.
  9. }
Add Comment
Please, Sign In to add comment