I am trying to read a jsonb field from a postgre table. I have tried to read it as a Jsonb type using the Jsonb library in the following way:
@Entity
@Table(name = "test")
data class Test(
@Id
val id: UUID = UUID.randomUUID(),
@Type(type = "jsonb")
@Column(columnDefinition = "jsonb")
val candidates: Jsonb = JsonbBuilder.create(),
)
But apparently, it doesnt build giving me the following error:
Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Invocation of init method failed; nested exception is org.hibernate.boot.registry.classloading.spi.ClassLoadingException: Unable to load class [jsonb]
I have found a few posts and answer. But none of them are apparently using this api