| I have a jsonb column in an Entity annotated as shown in the sample code. Everything works fine without the @Audited annotation. Adding the Audited annotation creates the org_master_aud table with the column custom_fields of type uuid instead of jsonb and the insert fails ``` @TypeDef(name = "jsonb", typeClass = JsonBinaryType.class) @Audited public class OrgMaster { @Type(type = "jsonb") @Column(columnDefinition = "jsonb",name="custom_fields",nullable=false) private JsonNode customFields; } ``` org.springframework.orm.jpa.JpaSystemException: Unable to perform beforeTransactionCompletion callback: org.hibernate.exception.DataException: could not execute statement; nested exception is org.hibernate.HibernateException: Unable to perform beforeTransactionCompletion callback: org.hibernate.exception.DataException: could not execute statement at org.springframework.orm.jpa.vendor.HibernateJpaDialect.convertHibernateAccessException(HibernateJpaDialect.java:353) . . . . at org.hibernate.internal.SessionImpl.doFlush(SessionImpl.java:1352) ... 94 more Caused by: org.postgresql.util.PSQLException: ERROR: invalid input syntax for type uuid: "{}" at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2578) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2313) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:331) at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:448) at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:369) at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:159) at org.postgresql.jdbc.PgPreparedStatement.executeUpdate(PgPreparedStatement.java:125) at com.zaxxer.hikari.pool.ProxyPreparedStatement.executeUpdate(ProxyPreparedStatement.java:61) at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeUpdate(HikariProxyPreparedStatement.java) at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:197) ... 105 more Attached the Snapshots of the custom_fields column in main and audit table where the audit table column is uuid whereas the main table is jsonb. Both are autogenerated. |