I have PostgreSQL database and there is column \'image\' with datatype \'bytea\'. I cannot modify columns or database configurations. JPA annotated POJO contains followign m
Try to annotate you entity with @Lob
@Lob
@Lob @Column(name="image") private byte[] image;
If you are using hibernate implementation you can add @Type(type="org.hibernate.type.BinaryType") in column too.
@Type(type="org.hibernate.type.BinaryType")
@Lob @Column(name="image") @Type(type="org.hibernate.type.BinaryType") private byte[] image;