Specify lob size in jpa object

I am using openjpa (WebSphere Application Server 7) to interact with the database. Is it possible to specify blob size in java entity file? It looks like this:

@Id @GeneratedValue(strategy = GenerationType.AUTO) private Long id; @Lob @Nullable private byte[] content; 

DB2 defaults to 1 MB. I want to change this to 20 MB.

+7
source share
1 answer

You can use the @Column annotation:

 @Id @GeneratedValue(strategy = GenerationType.AUTO) private Long id; @Lob @Nullable @Column(length = 20971520) private byte[] content; 
+9
source

All Articles