Java Persistence String length
Hi I am currently trying to store large strings using Java Persistence. I have found the annotation @Column(length=20000)
which increase the length of the string from 255 to the specified amount. The problem is that when I increase the value in excess of 50000 characters Java Persistence fails to create the table. The entity class is shown below.
@Entity
public class SubmittedFile implements Serializable {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private Long id;
@Column(length=20000)
private String fileText;
......
}
1. Is there any way of mapping a String to a unlimited data type, so I don't have to specify a length?
2. If not is there any way of increasing the length attribute above 50000 characters?