How to read jsonb from Postgres using the Jsonb library
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...