title: Storing JSON field using Hibernate and Oracle DB
body: <p>I'm using Hibernate with Spring Boot connected to an Oracle database.
  One of my Java entities is a class with a Jackson JsonNode object in it and I want to persist it in the database as a single field.
  Oracle recommend that JSON is stored as a BLOB but Hibernate doesn't seem to know how to convert a JsonNode to a BLOB by default. Example entity class below:</p>
  
  <pre><code>@Entity    
  public class MyEntity {
    @Id
    private Integer id;
  
    @Column(columnDefinition = "blob")
    private JsonNode data;
  }
  </code></pre>
  
  <p>How would you recommend I get this working? I'm assuming I need to write some sort of conversion class to convert to and from a BLOB.</p>