File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
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: 375

Hello Victor,

You need to add @Temporal annotation to the field..
I agree. Here's the link:
subject: Date variable in JPA
It's not a secret anymore!