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.
You can use the @Column
annotation:
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private Long id;
@Lob
@Nullable
@Column(length = 20971520)
private byte[] content;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With