Hi all,
We have some Report entity that contains a PDF file stored as a BLOB. It is declared like this:
@Entity
public class Report {
@Id
private int id;
@Column(name = "B_PDF")
@Lob @Basic(fetch=FetchType.LAZY)
private byte[] pdf;
...
}
So that we don't load the PDF when we don't need it (i.e. most of the time).
However for some feature we need to load several reports with their PDF so we'd like to perform a single query that loads everything. Is it possible using EclipseLink?
We already tried (which used to work with OpenJPA) and
query.setHint("eclipselink.join-fetch", "r.pdf");
but both throw an exception saying that this field does not support joining.
We are using WebLogic 12c with the provided version of EclipseLink.