Friday 22 April 2011

Using strings in JPA

According to the max size of a string we must set its type in JPA:

If size...

  • <=255 chars 
    •  it is the default
  •  <=65536 
    • for larger texts (<=65536 use @Size(max=65536) 
  • >65536
    •  use @Lob

No comments:

Post a Comment