java - What happens if the length attribute is not specified on the @Column annontation for a String -


What if I do not specify length attribute for the following comment? Notice that the field is string.

  @column (name = "region", nullable = false) public string getRegion () {return region; }  

If you do not specify the length attribute Hibernate takes the default length which is 255 if the type of attribute is string .

Check it out


Comments

Popular posts from this blog

sql - Find last match with latest inserted name in table -

c# - XML serialize base class without knowing derived class -

ios - Invalid IPA: missing embedded provisioning profile. Are you sure this is an ad hoc? -