title: JPA: how do I persist a String into a database field, type MYSQL Text
body: <p>The requirement is that the user can write an article, therefore I choose type <code>Text</code> for the <code>content</code> field inside mysql database. How can I convert <code>Java String</code> into <code>MySQL Text</code></p>
  
  <p>Here you go <code>Jim Tough</code></p>
  
  <pre><code>@Entity
  public class Article implements Serializable {
      private static final long serialVersionUID = 1L;
      @Id
      @GeneratedValue(strategy = GenerationType.AUTO)
      private Long id;
  
      private Long userId;
  
      private String title;
  
      private String content;
  
      private Integer vote;
  
      //Constructors, setters, getters, equals and hashcode
  }
  </code></pre>
  
  <p>In my MYSQL database, <code>content</code> is type <code>Text</code>.  I was hoping that there would be something like this <code>java.sql.Text</code>, since <code>java.sql.Blob</code> is an actual type, but sadly, that does not exist</p>