Hi,
I am having an error when persisting a Model Object with attribute :
Code:
@Required
@Column(name="url", length=1000)
@Length(max=1000)
public String url;
I use "jpa.ddl=create" in Play Framework application.conf to generate the tables in the first execution. DDL creates a column url of type "longtext" in the MySql database.
When I save the object, I have the following error :
Code:
(JDBCExceptionReporter.java:233) - SQL Error: 1406, SQLState: 22001
(JDBCExceptionReporter.java:234) - Data truncation: Data too long for column 'url' at row 1
The URL that causes me this problem has a length of 305 caracters.
I tried to increase the size of JPA annotation @Column to 10000 and to explicitly specify argument "columnDefinition=longtext" but it doesn't solve the problem.
Any ideas ?
Version of play is 1.2.2.
Version of mysql Jconnector is 5.1.17.
Version of hibernate-core is 3.6.1.
Version of hibernate-entitymanager is 3.6.0
Thx by advance