This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes javax.persistance Annoate long for Timestamp Column Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "javax.persistance Annoate long for Timestamp Column" Watch "javax.persistance Annoate long for Timestamp Column" New topic
Author

javax.persistance Annoate long for Timestamp Column

Ally Cavs
Ranch Hand

Joined: Aug 25, 2008
Posts: 89
Hi Guys

I will be receiving a Long from client side which is a representation of the time. I would like to be able to annotate the Long so the value can be persisted to a Timestamp DB field.
I could adjust setter and getter code to set a second java Timestamp field with a similar name and annotate the class accordingly but ill have to do this for every long (time) attribute

Any help would be much appreciated? There must be a a kind of Long to Timestamp mapper facility?

Thanks
Alan
Ally Cavs
Ranch Hand

Joined: Aug 25, 2008
Posts: 89
Any ideas guys?
 
jQuery in Action, 2nd edition
 
subject: javax.persistance Annoate long for Timestamp Column
 
Similar Threads
Passing date and time using Timestamp.
Date object or String?
JPA+Oracle+Date
Comparing Date and Timestamp: unexpected result
How to force new session when opening new browser window?