1

what mechanisms one can use to compress following ? Since I am using multiple databases I want it to be under the hood like how hibernate handle using Dialects.

 @Lob
 @Type(type = "org.hibernate.type.TextType")
 private String data;

or

@Lob
private byte[] data;
Njax3SmmM2x2a0Zf7Hpd
  • 1,354
  • 4
  • 22
  • 44

1 Answers1

1

LOB which stands for "Large object file" is not neccesary contains text information, so I think mapping it to String field, even with the help of @Type annotation is not the preferred solution, if your DBMS(es) supports CLOB or similar things.

TL;DR I think the second piece of code is way better LOB mapping.

Alexey Malev
  • 6,408
  • 4
  • 34
  • 52