specify lob size in jpa entity
blob, jpa
Solution
You can use the `@Column` annotation:
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private Long id;
@Lob
@Nullable
@Column(length = 20971520)
private byte[] content;
Problem
I am using openjpa (Websphere Application Server 7) to interact with the database. Is it possible to specify a blob size in the java entity file? It looks like: ``` @Id @GeneratedValue(strategy = GenerationType.AUTO) private Long id; @Lob @Nullable private byte[] content; ``` DB2 by defaults gives it a size of 1MB. I want to change that to 20MB.