What exactly does setting the length on a column do in JPA?
@Column(name = \"middle_name\", nullable = false, length = 32) public String getMiddleName() {
@Column(length=32) is only for DDL purpose and not for restricting means it allows more than 32 characters unless at table level it is not restricted.To restrict size we should go for @Size(max=32)
@Column(length=32)
@Size(max=32)