Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7930021
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T20:16:56+00:00 2026-06-03T20:16:56+00:00

I have a very simple JPA entity. It features some simple metadata fields, and

  • 0

I have a very simple JPA entity. It features some simple metadata fields, and ID and a large ~500kB-10MB payload String.

@Entity
public class MyEntity{
  @Id
  @GenerateValue(Strategy=GenerationType.IDENTITY)
  private long myEntityId;

  private String metaData1; 
  ..
  private String metaDataN;

  @Lob
  private String payload; // large.

}

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?

The whole thing is implemented using OpenJPA 1.2 and a DB2 backing database.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T20:16:58+00:00Added an answer on June 3, 2026 at 8:16 pm
    @Lob
    @Basic(fetch=FetchType.LAZY)
    private String payload;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have very simple question. In my application I have some TextEdit fields. I
I have some very simple XML: <properties> <property> <name>BobFish</name> <explaination>Bob is a fish.</explaination> </property>
I am a JPA newbie. I have what I believe is a very simple
Let's say we have very simple Java class MyClass . public class MyClass {
I have very simple code: List<String> list = new ArrayList<String>(); String a = a;
I have very simple: [PrincipalPermission(SecurityAction.Demand, Role = Administrator)] public partial class _Default : System.Web.UI.Page
I have a very simple Country entity which I want to cache. This works
I have very simple XML in a string that I'm trying to load via
I have very simple xml <root> <node>some value</node> </root> How can I get the
I have very simple window where I have 2 buttons - one for cancel,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.