db-ojb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Northam <Eric.Nort...@i4commerce.com>
Subject RE: REPOST: Timestamp and Order By
Date Wed, 02 Jul 2003 19:22:26 GMT
If you use DATE the time is truncated. The time on all the dates gets set to
12:00:00.

Eric

-----Original Message-----
From: David Choy [mailto:davidc@alloy.com] 
Sent: Wednesday, July 02, 2003 2:32 PM
To: OJB Users List
Subject: RE: REPOST: Timestamp and Order By


try using DATE


-----Original Message-----
From: Eric Northam [mailto:Eric.Northam@i4commerce.com]
Sent: Wednesday, July 02, 2003 2:12 PM
To: 'ojb-user@db.apache.org'
Subject: REPOST: Timestamp and Order By


I have a class that has a java.util.Date as a member variable and I've
mapped it to a DATETIME type in MySQL via a TIMESTAMP type in my
repository.xml. If I do an order by through an OQL query the dates are
sorted up to the day only. The time seems to be ignored e.g.

5/21/2003 09:12:00
5/21/2003 10:14:00
5/21/2003 09:12:00
5/22/2003 09:12:00
5/23/2003 09:12:00

If anyone knows if this is a bug or how to get around it please let me know?
Is there a unit test that validates that this works?

Eric





DISCLAIMER: The information contained in this e-mail is, unless otherwise
indicated, confidential and is intended solely for the use of the named
addressee. Access, copying or re-use of the e-mail or any information
contained therein by any other person is not authorized. If you are not the
intended recipient please notify us immediately by returning the e-mail to
the originator.


---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org





DISCLAIMER: The information contained in this e-mail is, unless otherwise
indicated, confidential and is intended solely for the use of the named
addressee. Access, copying or re-use of the e-mail or any information
contained therein by any other person is not authorized. If you are not the
intended recipient please notify us immediately by returning the e-mail to
the originator.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message