Bulk update optimistic locking with JPA and Hibernate
Introduction In this article, we are going to see how we can adjust a bulk update statement so that it takes optimistic locking into consideration. While Hibernate has been supporting versioned HQL queries for a very long time, it’s actually very easy to achieve this goal even with standard JPQL or JPA Criteria API. Bulk update optimistic locking with JPA and Hibernate.https://t.co/OsBnhkiHQj pic.twitter.com/BFqe4uL7LS — Java (@java) December 2, 2019 Domain Model Let’s consider we have a Post entity that has a status attribute that can take three possible values: PENDING, APPROVED, and SPAM....