Force update in Hibernate

hibernate, java

Solution

ok - found it myself. This does the trick:

Session session = (Session)entityManager.getDelegate();  
session.evict(entity);  
session.update(entity);

Problem

How can I force Hibernate to update an entity instance even if the entity is not dirty? I'm using Hibernate 3.3.2 GA, Hibernate Annotations and Hibernate EntityManager btw. I really want Hibernate to execute the generic UPDATE statement even if no property on the entity has changed. I need this because some event listeners need to get invoked to do some additional work when the application runs for the first time. Thanks!

Original source