seam-gen generates this code:
@Column(name = "CATEGORIA", nullable = false, length = 1)
@NotNull
@Length(max = 1)
public char getCategoria() {
return this.categoria;
}
and in the xxxEdit.xhtml doesn't generate:
size="1" maxlength="1"
next, when i enter 'A' in this field, seam complain: "length must be between 0 and 1".
i had to remove @Length, and add size and maxlength to work. i think it would be nice that seam-gen do it for me.
@Length doesn't make sense for a primitive char field -- chars don't have a length, Strings do. You'll probably find more help on the Hibernate forums for setting up mappings and validators.