37
I have a JPA entity with java.sql.Blob:
@Entity
public class LargeData {
@Lob
private java.sql.Blob data;
//getters/setters
}
How to create instance of this entity? I want to set Blob with setData() method, but how to get Blob from JPA? java.sql.Blob is only interface, there are different implementations for different databases, so I assume JPA should give me right implementation. How to get it?