I'm trying to insert a mass of data into the Mysql database using Hibernate. However I have the following error:
18:15:30,221 ERROR [org.hibernate.tool.hbm2ddl.SchemaExport] (ServerService Thread Pool -- 59) HHH000388: Unsuccessful: INSERT INTO tb_pessoa_fisica (id,nome,cpf,telefone_comercial,telefone_residencial,telefone_celular,email,idade,data_nascimento) VALUES (92,"Zeph Damon Maddox","64871487509","(14)3523-6032","(55)8246-5275","(38)7000-8218","[email protected]",58,"2015-04-26")
18:15:30,221 ERROR [org.hibernate.tool.hbm2ddl.SchemaExport] (ServerService Thread Pool -- 59) Data truncation: Data too long for column 'cpf' at row 1
My attribute is like this in java:
@NotBlank
@Pattern(regexp="\d{11}", message="ATENÇÃO: Deve ser informado 11 dígitos!")
@Column(columnDefinition="char(11)", nullable=false)
private String cpf;
Does anyone help me to understand this problem and solve it?