You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-user@db.apache.org by Roel van Dijk <rd...@gmail.com> on 2005/05/09 16:19:14 UTC
date fields / oracle
I'm using Torque as part of Apache Jetspeed, and was wondering about
date fields. I've created a custom table, which has a column
declaration like this:
<column name="LAST_LOGIN" type="DATE"/>
Then I do this in my Java code:
Date now = new Date();
entry.setLastLogin(now);
My Oracle (9) database now has this entry:
2002-05-09 00:00:00
As you can see, the time has not been stored. Is there a way to fix
this? (is there something like a datetime type?)
As a sidenote, where can I find a list of the available column types
that I can use in my XML schema?
--
Roel -- rdvdijk@gmail.com
---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org
Re: date fields / oracle
Posted by Roel van Dijk <rd...@gmail.com>.
> As a sidenote, where can I find a list of the available column types
> that I can use in my XML schema?
And a related question: where can I find the mapping between these
column types (as defined in the XML schema), and the Java objects in
the created OM classes? (e.g. VARCHAR to String, INTEGER to int, DATE
to Date, etc..)
--
Roel -- rdvdijk@gmail.com
---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org