how to set length of an column in hibernate with maximum length

Problem :

I want to save an object in data base.
I'm using MySQL data base, but when I try it I get an exception that says: "data is bigger than Column length".
How can I increase the length of my column using hibernate?

Solution :

if your column is varchar use annotation length

@Column(length = 255)

or use another column type


Mysql Tutorials

Mysql Howto..

How to fill multiple input fieds with one MySQL query

How do you deal with a non-standard date format in mysql?

How do I fetch individual columns from my tables using php and MySQL?

SQL parameterization: How does this work behind the scenes?

How to write a single query for multiple data manipulation in mysql ?

In Python, if I have a unix timestamp, how do I insert that into a MySQL datetime field?

How to get data of second and third table based of first table match

how to update an array from input box in php mysql

PHP: How to save mysql to excel file to a directory and not prompt user to download

mysql query: how to join and count duplicates and order by that count

How to hyperlink two different columns using php and mysql

How to use Spark DataFrame with MySQL

How to create a JDBC MySQL connection pool in Tomcat7 installed on Amazon EC2?

How I save and retrieve an image on my server in a java webapp [duplicate]

How to create a Diagram from a MySql database in Workbench?

How to solve this perticular query in MySql?

How to sum records of a single column with different possiblities?

Counting how many times each unique element appeared in the table

MySQL - Perl- Order by - How to display ABS(PartNum) DESC but, three different (PartNum) categories?

How to find daily average over a time period in mysql?

How do I insert a space in a word using a MySQL string function?

How to just show few lines from a whole blog-post on a certain page?

How to select two columns from multiple tables and put them next to each other (no relationships or critera) in MySQL?

how to connect two mysql tables in which I am inserting data in same time

How do I merge two partially overlapping lists in MySQL?

PHP MySQL DSN Connections - How to enable mysql://

How to import big file sql to mysql locally

How to set a timeout for MySQL query using C API

How to add directory location to mysql varchar?

How to group number of rows per day also in no-row days in MySQL?