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 Date variable in JPA 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 "Date variable in JPA" Watch "Date variable in JPA" New topic

Date variable in JPA

victor chiong
Ranch Hand

Joined: Apr 04, 2012
Posts: 73
Hi Guys

I am practicing JPA howerver.... private Date updatedTime; is not allowed.. Any package to be added?

Im using openjpa.

R. Jain
Ranch Hand

Joined: Aug 11, 2012
Posts: 370

Hello Victor,

You need to add @Temporal annotation to the field..
I agree. Here's the link:
subject: Date variable in JPA
Similar Threads
how to write a JPA named query to retrive records based on day
JPA 2.0 - good and up-to-date tutorial
Why Timestamp isn't allowed as a primary key?
hibernate query to retrive records based on a day from date/time field
Beta for Sun Certified EJB Developer Java EE 6 Exam