Java Mailing List Archive

http://www.gg3721.com/

Home » users.openjpa »

current_date and persistent date field

Marc Logemann

2008-09-03

Replies: Find Java Web Hosting

Author LoginPost Reply
Hi,

suppose i have a datetime field "created" in the DB which is mapped by
JPA to a java.util.Date attribute in my domain class.

Now i want to create a query which is something like:

"select x from Order x where x.created = current_date"

The problem is. This never matches because current_date represents
only the current date and in my Date attribute we have a complete Date
with time. My intention is to compare just the date, but i have a
java.util.Date attribute. It seems thats not possible at all.

Anyone with ideas? Thanks.

--
Marc Logemann
blog http://logemannreloaded.blogspot.com
privat http://www.logemann.org



©2008 gg3721.com - Jax Systems, LLC, U.S.A.