I have a very simple JPA object. It contains several simple metadata fields, as well as an identifier and a large payload of ~ 500 kB-10 MB.
@Entity
public class MyEntity{
@Id
@GenerateValue(Strategy=GenerationType.IDENTITY)
private long myEntityId;
private String metaData1;
..
private String metaDataN;
@Lob
private String payload;
}
In most cases, I do not alternate when loading in a payload, but simply request metadata fields. Is there a way to load the payload lazy without creating a specific object that wraps the payload and has a one-to-one relationship from lazy load to one of my main object?
All of this is implemented using OpenJPA 1.2 and the DB2 support database.
source
share