Any one experiencing following issue, while persistence of Outbox table payload column for JSONB/JSON ?
1) I have class, public class OutboxEvent implements ExportedEvent<String, SampleInfo>
2021-06-10 09:44:42 DEBUG [io.de.ou.qu.de.OutboxProcessor] (build-18) Outbox entity HBM mapping:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<identifier-generator class="uuid2" name="uuid2"/>
<class table="outbox" entity-name="io.debezium.outbox.quarkus.internal.OutboxEvent">
<id name="id" type="java.util.UUID">
<column name="id"/>
<generator class="uuid2"/>
</id>
<property name="aggregateType" not-null="true" type="string">
<column name="aggregatetype"/>
</property>
<property name="aggregateId" not-null="true" type="java.lang.String">
<column name="aggregateid"/>
</property>
<property name="type" not-null="true" type="string">
<column name="type"/>
</property>
<property name="timestamp" not-null="true" type="Instant">
<column name="timestamp"/>
</property>
<property name="payload" not-null="false" type="com.test.service.dto.SampleInfo">
<column name="payload" sql-type="JSONB"/>
</property>
<property name="tracingspancontext" not-null="false" type="string">
<column length="256" name="tracingspancontext"/>
</property>
</class>
</hibernate-mapping>
3) when Hibernate persist SampleInfo object to payload column of outbox table I see below error. Looks like hibernate is convert SampleInfo object as byte array.
2021-06-10 09:44:50 WARN [or.hi.en.jd.sp.SqlExceptionHelper] (vert.x-worker-thread-0) SQL Error: 0, SQLState: 42804
2021-06-10 09:44:50 ERROR [or.hi.en.jd.sp.SqlExceptionHelper] (vert.x-worker-thread-0) ERROR: column "payload" is of type jsonb but expression is of type bytea
Hint: You will need to rewrite or cast the expression.
Position: 123