简体   繁体   中英

Entity with @Column length greater than 255 characters

Since the default is 255 how would I specify an "infinite" length to hold information such as a huge text? It should not be a vendor specific solution such as the "columnDefinition" property.

Try a "text" (lob) http://www.postgresql.org/docs/8.0/static/datatype-character.html

@Lob
@Type(type = "org.hibernate.type.TextType")

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM