Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Transactional
- public ResponseType methodA(UserObject userObject) {
- //save call
- jpaRepoObject.save(userObject);
- //next call will fail due to relational constraints on database
- jpaRepoObject.save(userObject); //should throw PSQLException/DataViolationException
- return new ResponseType("success"); //Error thrown after this line.
- }
Add Comment
Please, Sign In to add comment