I understand what this message means, but I do not understand why it is giving this message. I say this because I'm not trying to update this field.
Column definition:
@Column(name="company_name")
private String companyName;
Then I create a Query using EntityManager.
Query
query = em.createQuery("update Client set companyName = :companyName" +
" where id = :id");
query.setParameter("companyName", client.getCompanyName());
query.setParameter("id", client.getId());
query.executeUpdate();
And the exception reads: Data truncation: Data too long for column 'company_cnpj' at row 1
But I'm not changing the 'company_cnpj' row. Why is it giving me this error?