I have a JSF application with JPA and EclipseLink. There is an entity with several attributes including a Lob type to store large binary data.
I need to frequently search the entities and display them in a list. Only when the user wants to view that, the Large Binary data is needed.
Can I have a method to lazy load the binary data? Or do I have to take it out as another entity with one to one relationship?
Can be done easily. Use the following annotation.
@Basic(fetch=FetchType.LAZY)