Aziz, first off, what makes you think that the mySQL datetime type is not supported ? Second, many of the mySQL types suffer from the fact that they don't support fractions of a second (i.e. by simply dropping the fraction value), and hence cannot be used to persist java.sql.Timestamp values. One could of course use LONGs to persist time stamps.
Werner wg> -----Original Message----- wg> From: Aziz Hammadi [mailto:[EMAIL PROTECTED] wg> Sent: Tuesday, June 14, 2005 1:20 PM wg> To: [email protected] wg> Subject: [castor-user] [JDO] support for the mysql type datetime wg> wg> wg> Hi all! wg> I am just wondering while the mysql type DATETIME has 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 java.sql.Timestamp.class. I added wg> the following entry wg> new TypeInfo( java.sql.Types.TIMESTAMP, "datetime", =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: wg> http://www.issociate.de/board/post/18070/JConnector=5F3.0=5F wg> and=5FDAT= wg> ETIME.html wg> wg> wg> Cheers wg> Aziz wg> wg> ------------------------------------------------- wg> If you wish to unsubscribe from this list, please wg> send an empty message to the following address: wg> wg> [EMAIL PROTECTED] wg> ------------------------------------------------- wg> wg> ------------------------------------------------- If you wish to unsubscribe from this list, please send an empty message to the following address: [EMAIL PROTECTED] -------------------------------------------------

