java - Hibernate not recognizing column length in script. Its using default one and giving Data too long for column error -


i using scripts generate tables instead of hibernate auto generate. there varchar column length 5000

create table my_code (     cc_id bigint not null auto_increment unique,     description varchar(5000),     primary key (cc_id) ) engine=innodb 

in class have description field:

@column(name = "description", length=5000) private string description; 

but when insert field length 300 throws:

data truncation: data long column 'description' @ row 1

it accepts below 255 default. why not picking length 5000?

the problem related table. have audit table field 'description' also. once increased size of audit table description field error went away. unfortunately error thrown hibernate did not state on table error thrown , assumed on regular table.


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -