Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Fetching entities with their lazy Lob fields using a query?
Fetching entities with their lazy Lob fields using a query? [message #892449] Thu, 28 June 2012 05:15 Go to previous message
Didier L is currently offline Didier L
Messages: 2
Registered: June 2012
Junior Member
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
JOIN FETCH r.pdf
(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.
 
Read Message
Read Message
Read Message
Previous Topic:Connect with MS-SQL "lock"
Next Topic:not retrieving entity when an attribute of it has value 0.0
Goto Forum:
  


Current Time: Tue May 21 17:41:08 EDT 2013

Powered by FUDForum. Page generated in 0.01589 seconds