Since the Java Persistence API is part of EJB3, maybe this is the correct forum for this question.
I'm a newbie with JPA. Using it standalone, not as part of an EJB3 app. I have an entity class with a java.util.Date field in it, named 'timestamp' that is annotated as @Temporal(value = TemporalType.TIMESTAMP). This annotation makes the timestamp into a java.sql.Timestamp type, which is what I want, I think, since I need both date and time and the other options produce either java.sql.Date or java.sql.Time, neither of which include both the date and the time.
Question 1: TemporalType.TIMESTAMP is what I want, right?
When I instantiate an entity object of this type I provide a java.util.Date that somehow magically gets turned into a java.sql.Timestamp when it gets persisted. Right?
Question 2: How can I later do a JPA query language (aka EJB3 query language) query against that database using a WHERE clause with a constraint on the time?
For example, I want something like this:
SELECT t FROM tablename t WHERE t.timestamp>something
More explicit question 2: What should the "something" be in that query?
Thanks.