Description
After migrating to Spring Boot 3.0.1 and Hibernate 6, I swapped out the Hibernate Types JSON support for the new built in @JdbcTypeCode(SqlTypes.JSON)
, however my Kotlin data classes failed to deserialize and I had to annotate everything with @JsonCreator
and @JsonProperty
to fix constructors.
I feel like this should default to the Jackson instance on the Spring context rather than the Jackson library itself, that is pulled in by Hibernate by default. It should be possible to define a custom mapper factory that can be configured via hibernate.type.json_format_mapper
and point Hibernate to that instance, see https://github.com/hibernate/hibernate-orm/blob/main/documentation/src/main/asciidoc/userguide/chapters/domain/basic_types.adoc#json-mapping