I followed the article and created my table. However, I got this error while inserting a row in the audit table. Instead of inserting an integer in column "rev", it tried to insert a hashmap.
"ClassCastException: java.util.HashMap cannot be cast to java.lang.Integer"
Some additional information from the log:
Hibernate: select nextval ('hibernate_sequence')
Hibernate: insert into ims_audit.revinfo (revtstmp, rev) values (?, ?)
2020-02-21 08:31:34 TRACE o.h.type.descriptor.sql.BasicBinder - binding parameter [1] as [BIGINT] - [1582291894650]
2020-02-21 08:31:34 TRACE o.h.type.descriptor.sql.BasicBinder - binding parameter [2] as [INTEGER] - [71]
Hibernate: insert into ims_audit.private_charging_party (REVTYPE, REVEND, address_line1, address_line2, cell_number, city, country, county, date_of_birth, email_address, extension, fax_number, first_name, home_phone, is_hispanic, language_code, last_name, mediation_reply, middle_initial, name_prefix, name_suffix, national_origin, organization_name, other_language, position_statement_release_dte, position_statement_request, position_statement_request_dte, race, sex, sign_language_need, state, work_phone, zip_code, charging_party_id, REV) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
The problem is here:
binding parameter [27] as [INTEGER] - [{REV=PrepaRevisionEntity [getRevisionDate()=Fri Feb 21 08:31:34 EST 2020, hashCode()=1743932516, toString()=BaseRevisionEntity [revisionNumber=71, revisionTimestamp=1582291894650], getClass()=class gov.eeoc.prepa.ws.modern.entity.common.SampleRevisionEntity], respondentId=66}]
2020-02-21 08:31:34 ERROR org.hibernate.AssertionFailure - HHH000099: an assertion failure occurred (this may indicate a bug in Hibernate, but is more likely due to unsafe use of the session): java.lang.ClassCastException: java.util.HashMap cannot be cast to java.lang.Integer