# A simple db read causes a PreUpdate event

**URL:** <https://discourse.hibernate.org/t/a-simple-db-read-causes-a-preupdate-event/2558>\
**Category:** Hibernate ORM\
**Created:** [April 2, 2019, 1:51pm UTC](https://discourse.hibernate.org/t/a-simple-db-read-causes-a-preupdate-event/2558 "2019-04-02T13:51:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![cen](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.hibernate.org/cen/32/534_2.png) [@cen](https://discourse.hibernate.org/u/cen)\
**Post date:** [April 2, 2019, 1:51pm UTC](https://discourse.hibernate.org/t/a-simple-db-read-causes-a-preupdate-event/2558/1 "2019-04-02T13:51:06Z")

</div>

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
