Thanks, Ralf. That's exactly what I had in mind when asking Aziz why he thinks 
that DATETIME is not supported.

Werner

wg> -----Original Message-----
wg> From: Ralf Joachim [mailto:[EMAIL PROTECTED]
wg> Sent: Tuesday, June 14, 2005 1:42 PM
wg> To: [email protected]
wg> Subject: Re: [castor-user] [JDO] support for the mysql type datetime
wg> 
wg> 
wg> Hi Aziz,
wg> 
wg> if you use:
wg> 
wg>      <field name="creationTime" type="java.util.Date">
wg>        <sql name="ctime" type="timestamp" />
wg>      </field>
wg> 
wg> in mapping.xml and create the ctime column with type 
wg> DATETIME then it 
wg> works without patching castor.
wg> 
wg> Regards
wg> Ralf
wg> 
wg> 
wg> 
wg> Aziz Hammadi schrieb:
wg> > Hi all!
wg> > I am just wondering while the mysql type  DATETIME has 
wg> not yet been
wg> > implemented. The MySQL Connector/J supports allready this type by
wg> > using java.sql.Timestamp to model it. I tried to hack the 
wg> castor code
wg> > (SQLTypes.java) to map datetime to 
wg> java.sql.Timestamp.class. I added
wg> > the following entry
wg> >  new TypeInfo( java.sql.Types.TIMESTAMP,      "datetime", 
wg>     =3D20
wg> > java.sql.Timestamp.class),
wg> > to the =5FtypeInfos array.
wg> > 
wg> > Well this little change produced the value "1989-01-24 
wg> 00:00:00" in my
wg> > table. I guess it needs more modifications to handle the 00:00:00
wg> > part. What do you think=3F is this a correct concept=3F
wg> > 
wg> > reference: 
http://www.issociate.de/board/post/18070/JConnector=5F3.0=5Fand=5FDAT=
> ETIME.html
> 
> 
> Cheers
> Aziz
> 
> -------------------------------------------------
> If you wish to unsubscribe from this list, please 
> send an empty message to the following address:
> 
> [EMAIL PROTECTED]
> -------------------------------------------------

-- 

Syscon Ingenieurb�ro f�r
Me�- und Datentechnik GmbH
Ralf Joachim
Raiffeisenstra�e 11
D-72127 Kusterdingen
Germany

Tel.   +49 7071 3690 52
Mobil: +49 173 9630135
Fax    +49 7071 3690 98

Email: [EMAIL PROTECTED]
Web:   www.syscon-world.de

-------------------------------------------------
If you wish to unsubscribe from this list, please 
send an empty message to the following address:

[EMAIL PROTECTED]
-------------------------------------------------


-------------------------------------------------
If you wish to unsubscribe from this list, please
send an empty message to the following address:

[EMAIL PROTECTED]
-------------------------------------------------

Reply via email to