• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

Why is Hibernate updating after a select?  RSS feed

 
Ranch Hand
Posts: 35
Eclipse IDE Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone,

I have a wierd problem with my code. I'm using JPA/Hibernate, and for some odd reason (well odd to me at least), Hibernate is performing an update on very row in my table after doing a select. When I make a call to a method that simply does "from OwordDocuments" to return a List of OwordDocuments object, Hibernate befores an update on every row in my table. I noticed that when I switch one of the fields in my table from a TemporalType.TIMESTAMP to TemporalType.DATE, this update does not occur. Why is that?

Here is my class that was generated by Hibernate...


As I said, when I switch the field updateDate on line 158 to @Temporal(TemporalType.DATE), this update does not happen.

Here is my class that executes the select...


Any ideas why the updates are happening, and how I can stop it from happening?
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!