Suppose there is an entity like:
@Audited
@Entity
class Order {
...
@Embedded
var coupon: Coupon? = null
...
}
and the embedded class:
@Embeddable
class Coupon {
...
@JdbcTypeCode(java.sql.Types.VARCHAR)
var couponId: UUID? = null
...
}
The hibernate shows create table
query for Order
like:
Hibernate:
create table order (
...
coupon_id varchar(36),
...
)
but the envers shows query like:
Hibernate:
create table order_aud (
...
coupon_id uuid,
...
)
So it seems like @JdbcTypeCode(java.sql.Types.VARCHAR)
isn’t working for the envers table.
@Column(columnDefinition = "varchar")
doesn’t work as well.
Tested on:
- Spring Boot 3.2
- Hibernate 6.3.1
Any idea to solve this problem please?