We have some database tables that we can't add version columns to so I
would like to instead create a version number by using checksums on
I'm thinking specifically of Oracle here but I assume other platforms
may have equivalent features; the sort of query I am looking at using
select id, name, salary,
dbms_crypto.hash(utl_raw.cast_to_raw(id || name ||
salary), 1) as version
In this example, the version column is populated with the MD4 sum of
the three properties.
I've tried to create a custom EntityPersister but it looks like I'll
need to dig deeper. My plan would be to create the checksum code
automatically depending on the 'versionability' of the properties.
If this sounds useful/sane I am happy to work on a patch.