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 6784485
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T17:00:01+00:00 2026-05-26T17:00:01+00:00

I have a document entity mapped many to one to project entity. When I

  • 0

I have a document entity mapped many to one to project entity.

When I call document.getProject, in debugger, in project field of document object I see something about Project$$EnhancerByCGLIB$$67a694bd.

How do I retrieve actual project object?

  • 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-05-26T17:00:02+00:00Added an answer on May 26, 2026 at 5:00 pm

    What You are seeing is the Hibernate-Proxy-Object, which enables hibernate to do lazy-instantiation.

    First thing to ask yourself is, whether you really want to access the original object. Usually you should be better off pretending the proxy is your actual object and let hibernate do all the magic.

    If for some reason you really need the object itself (e.g. if you need the exact type), the following code should work:

    if (object instanceof HibernateProxy) {
       return ((HibernateProxy) object).getHibernateLazyInitializer().getImplementation();
    }
    

    You should be aware that the result of abovewritten code will give you a detached object which is no longer under hibernate control, so changes to the object will not be synchronized with the database!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an XML document that I generate from an Entity Framework object. The
I have an entity class Document and another one called Space. The relation: @ManyToOne(fetch
Well, I have read the document about Entity Proxy http://code.google.com/webtoolkit/doc/latest/DevGuideRequestFactory.html . As far as
Hi I have an object called document and one called user Document public virtual
I have 2 extension methods that convert a MongoDB document to an entity/object. public
Lets assume we have an entity called Document and an other one called User.
I have a document-based Core Data app. My main Core Data entity has several
I have a document, something like this: <root> <A node=1/> <B node=2/> <A node=3/>
I have two entity types: Document (has a Customer ) and Customer (has a
I have an entity Course that has a key to another entity (Document) inside.

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.