org.postgresql.util.PSQLException: ERROR: value too long for type charactervariing(255)
2022-09-04 07:33:43
目标是使用休眠将文本保存到数据库中。json
Users.java
& UsersBooks.java
同样,
书籍.java:
@Entity
@Table(name="tblbooks")
public class Books {
@Id
@Column(name = "bookshareId")
private int bookshareId;
@Column(name="author")
private String author;
@Column(name = "availableToDownload")
private int availableToDownload;
@Column(name = "briefSynopsis")
private String briefSynopsis;
@Column(name="category")
private String category;
@Column(name = "completeSynopsis")
private String completeSynopsis;
@Column(name = "contentId")
private int contentId;
@Column(name = "copyright")
private Date copyright;
@Column(name="downloadFormat")
private String downloadFormat;
@Column(name="dtbookSize")
private int dtbookSize;
@Column(name = "freelyAvailable")
private int freelyAvailable;
@Column(name = "brf")
private int brf;
@Column(name = "daisy")
private int daisy;
@Column(name = "images")
private int images;
@Column(name = "isbn13")
private String isbn13;
@Column(name="language")
private String language;
@Column(name = "publishDate")
private Date publishDate;
@Column(name = "publisher")
private String publisher;
@Column(name = "quality")
private String quality;
@Column(name = "title")
private String title;
@OneToMany(mappedBy="book")
private List<UsersBooks> usersBooks;
//Getters & Setters