Here is how I do it. Every object that I want to version (to prevent writing stale data) has an integer version property. A corresponding integer database row is also created. Hibernate takes care of everything else. If anyone tries to update an object with a version number lower than the current one in the db for that row, Hibernate throw an error.
Code:
<version
name="version"
type="int"
column="version"
access="property"
unsaved-value="negative"
/>
If you really needed to know the time when data was modified, then that is a different kettle of fish.