Dear Support Team,
we ran into some difficulties with a database. When fetching a entity using the EntityManager and afterwards calling "iterator().next()" a transaction begin/commit will end up in updating the Entity even there was no change.
RepositoryModelData repository = connection.find(RepositoryModelData.class, 1); repository.getObsTypes().iterator().next(); connection.getTransaction().begin(); connection.getTransaction().commit(); // --> will result in a call of @PreUpdate annotated methods
We attached a simplified test case where only 2 reduced versions of the entities are available. But it still shows the unexpected behavior. To reproduce just run the "EntryPoint" class.