KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
The requirement is that the user can write an article, therefore I choose type Text for the content field inside mysql database. How can I convert Java String into MySQL Text Here you go Jim Tough @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 } In my MYSQL database, content is type Text . I was hoping that there would be something like this java.sql.Text , since java.sql.Blob is an actual type, but sadly, that does not exist
Tags (comma-separated)
Save Edits
Cancel