We figure out whether data of a single property has changed in SinglePropertyMapper#mapToMapFromEntity(SessionImplementor, Map<String, Object>, Object, Object). So the comparison is based on equals() method. I wanted to change this to:
public boolean mapToMapFromEntity(SessionImplementor session, Map<String, Object> data, Object newObj, Object oldObj) { boolean dbLogicallyDifferent = true; if ((session.getFactory().getDialect() instanceof Oracle8iDialect) && (newObj instanceof String || oldObj instanceof String)) { // Don't generate new revision when Oracle replaces empty string with NULL during INSERT or UPDATE statements. dbLogicallyDifferent = !(StringTools.isEmpty((String) newObj) && StringTools.isEmpty((String) oldObj)); } return dbLogicallyDifferent && !Tools.objectsEqual(newObj, oldObj); } IMO there is no need to add an extra method to Dialect class. If it's only for Oracle, I am happy to check it like above. _______________________________________________ hibernate-dev mailing list hibernate-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev