• Post Reply Bookmark Topic Watch Topic
  • New Topic

modification in chapter 12 validatingLifecycle

Himai Minh
Ranch Hand
Posts: 1400
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In chapter 12, validatingLifecycle example,

I modified this to make the example easier to understand:

I first add id=10, name=Jason, vacation= 111 to the database.
Then, when I remove Jason, it throws an exception like this:

javax.validation.ConstraintViolationException: Bean Validation constraint(s) violated while executing Automatic Bean Validation on callback event:'preRemove'

Then, I update Jason's vacation = 1.
Then, I remove Jason. It works.
When Jason is removed from the front-end, the automated validation occurs before Jason is removed without exception.
my overalls have superpowers - they repel people who think fashion is important. Tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!