Variable type for persistence in MYSQL Longtext

0

Good morning,

In my database MySQL , I have a column of type longText.

My question is how to declare the type and annotation of this variable in the java class. In brief research I found the following information:

@Blob
private String meuCampo;

Does this apply?

Thank you!

    
asked by anonymous 18.01.2018 / 14:14

1 answer

0
//Definição JPA 1.0.
@Lob
// Por padrão o tamanho do Text é limitado 65535 bytes.
@Column(name="campo", length=2147483647) 
// No seu caso é LongText 2147483647 bytes.
private String meuCampo;
    
18.01.2018 / 14:22