Hi I have a String variable It is nullable=true in the database. I have defined it as follows :
@Column(name = "MINI_NO", length = 1) @Range(min = 1, max = 6, message = "miniNo out of Range") public String getMiniNo() { return this.miniNo; }
public void setMiniNo(String miniNo) { this.miniNo = miniNo; }
The thing is when I am updating this variable in a form in my application, I observe the following behavior:
When I don't enter any value and submit the form I get Validation failed from hibernate. What I am trying to understand is that since this variable is nullable in the database and String datatype. Why is it not accepting no value being entered.
I mean it accepts the values from 1 to 6 and any other number out of the range will display the message "miniNo out of Range" but it does not accept if no value is being entered in the field. Isn't it nullable, it should accept it, I would think.
Any thoughts and suggestion please.
thanks Sai
|