I have a problem with my database. It's a database that you can create with Netbeans. I want to insert a string that is longer than 255 characters. I have seen that you can say varchar(512)
. But I generate my tables with the @Entity
-Annotation and attributes in my class.
How can I put longer strings into the database?
I am using Netbeans 8.0.2.
In your entity classes use the
@Column
annotation for the fields you want and specifycolumnDefinition="VARCHAR(512)"
.