Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Modifying Hibernate object after fetching data from Sql

 
Nilesh Vidyarthi
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am selecting a timezone on my site and i want that the hibernate should change the time fetched from a particular table of the database to this selected timezone every time when a flag is switched on for TimeZone .
So how can i modify the fetched object with my time zone before parsing it further
 
Roel De Nijs
Sheriff
Posts: 10662
144
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Nilesh Vidyarthi,

First of all, a warm welcome to CodeRanch!

Nilesh Vidyarthi wrote:So how can i modify the fetched object with my time zone before parsing it further

Did you already consider the JPA lifecycle events, in particular the PostLoad one?

Hope it helps!
Kind regards,
Roel
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic