title: OpenJPA1.2 - lazy load a BLOB
body: <p>I have a very simple JPA entity. It features some simple metadata fields, and ID and a large ~500kB-10MB payload String. </p>
  
  <pre><code>@Entity
  public class MyEntity{
    @Id
    @GenerateValue(Strategy=GenerationType.IDENTITY)
    private long myEntityId;
  
    private String metaData1; 
    ..
    private String metaDataN;
  
    @Lob
    private String payload; // large.
  </code></pre>
  
  <p>}</p>
  
  <p>Most of the time, I am not intersseted in loading in the payload, but simply query the metadata fields. Is there a way to load the payload lazy without creating a specific Entity that wrapps the payload and have a lazy load one-to-one relation with that one from my main entity?</p>
  
  <p>The whole thing is implemented using OpenJPA 1.2 and a DB2 backing database.</p>