• 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.
 
And then we all jump out and yell "surprise! we got you this tiny ad!"
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!