openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc Logemann ...@logemann.org>
Subject current_date and persistent date field
Date Wed, 03 Sep 2008 23:05:35 GMT
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




Mime
View raw message