• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Rob Spoor
  • Bear Bibeault
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • Frits Walraven
  • Himai Minh

Retrieving clean Entity from EntityManager

Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Good Afternoon,

I am using Hibernate behing JPA and have the following problem.

My application pulls an entity out using the find operation of the
EntityManager, and then somewhere else in my application I want to pull
the same Entity out again cleanly with the current database state rather
than the dirty version but any time I try I get the same dirty data.

I have tried to detach the dirty version and then fetch the Entity again
but it is still same.

I have also tried the CacheRetrieveMode.BYPASS hint on the fetch in case
it is a caching problem.

How can I fetch a clean instance of my Entity side by side with the dirty



You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    Bookmark Topic Watch Topic
  • New Topic