I am in the process of migrating from JBoss 4.2.2 with Hibernate 3 to JBoss 7 with Hibernate 4.
I use MySQL 5
The following code used to work:
Code:
@Column
public Number getTimezone() {
return latitude;
}
where the column type is TINYBLOB
but now I get the error:
Caused by: org.hibernate.exception.DataException: Data truncation: Data too long for column 'timezone' at row 1
Caused by: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'timezone' at row 1
Does anyone know how to avoid this error?