• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Practical usages of PrePersist() & PostPersist()

 
Namitha karupaiya
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can anyone give me some practical examples (usecases) where PrePersist() & PostPersist() of JPA can be used?

Thanks.
 
tabiul mahmood
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It seems very similar to trigger to me. Before and After trigger. So I guess that you can put logic such as audit etc in the AfterPresist.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic