cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Schröder <>
Subject AW: Converting timestamp to date for queries
Date Tue, 19 Jun 2007 06:30:50 GMT
hi kevin,

i think that you can set DATE for the db-entity in the modeler. afaik, this has impact on
the resultset you get. this was something i resently discovered, but i am not sure about what
and why.

kind regards

-----Urspr√ľngliche Nachricht-----
Von: Kevin Menard [] 
Gesendet: Montag, 18. Juni 2007 21:44
Betreff: Converting timestamp to date for queries


I've been playing around with django a lot lately and they have a
concept of "generic views", which basically is a way to list objects by
date and/or slug.  I decided to try doing this with my Tapestry 4 app,
but have been running into problems.  In particular, one of my models
uses TIMESTAMP for its "pubDate" field.  Generally, I do want to have
both the date and time information, but I'd like to query by date and
slug.  It is assumed that there is a unique combination of both.


I've been trying to build up a java.util.Date based on the information
provided in that URL and pass it off to a named query.  The query
executes just dandy, but I get nothing back because the time values do
not match.  Is there anyway to do a type conversion and just compare by
the date portion?


Kevin Menard
Servprise International, Inc.
800.832.3823 x308 

View raw message