title: How to persist a JPA field as a clob?
body: <p>I've a class that doesn't serialize very well to a relational entity. As so, I'd like to persist it using JPA as a CLOB (I can serialize it to a String). How would I do this using JPA?</p>
  
  <p>Example Entity:</p>
  
  <pre><code>@Entity
  @Table(name = "MY_TABLE")
  public class Foo {
     @Id
     private Long id;
     private String simpleString;
     private Bar bar;
  }
  </code></pre>
  
  <p>Bar is the class that I'd like persisted as a CLOB inside MY_TABLE.</p>