A simple db read causes a PreUpdate event

#1

This simple select in a transaction causes a @PreUpdate event to be triggered for every single selected entity:

em.getTransaction().begin();
List result = em
.createNamedQuery(“Stores.getAll”, Store.class)
.getResultList();
em.getTransaction().commit();

EclipseLink does not produce this bug.

Optimistic locking with @Version is used, no other specialities that I can think of.

Hibernate v 5.2.10.Final

0 Likes