Hello,
Hibernate has two possible places where data can get cached, in the first level cache (the Session) or the second level cache (some third party cache implementation).
The first level cache is always used when you open a Session and load an object into it. You can update this object's properties all you like, its only when the session is flushed or closed (by calling those methods on the session) that the object's properties are persisted to the database.
The second level cache is only used if you explicitly add caching declarations to your mapping files. Otherwise it is not used.
Given this I suspect that you are not properly closing the session and that's why you are able to see the changes. If you have second level cache (EHCache) then use following xml to disable it. Disabling first level cache is not recommended and there is not suitable way to di this. You can use
session.evict(YOUR OBJECT)
to remove your object from this cache though.
<property name="hibernate.cache.provider_class">
net.sf.ehcache.hibernate.EhCacheProvider
</property>
<property name="hibernate.cache.region.factory_class">
net.sf.ehcache.hibernate.EhCacheRegionFactory
</property>
<property name="hibernate.cache.use_query_cache">true</property>
<property name="hibernate.cache.use_second_level_cache">true</property>
<property name="hibernate.cache.use_structured_entries">true</property>
<property name="hibernate.cache.generate_statistics">true</property>
Regards,