Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Modifying Hibernate object after fetching data from Sql  RSS feed

 
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: 11077
173
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
Boost this thread!