You could use either TIMESTAMP and DATE (note that TIMESTAMP will maintain date and
time).
You object should use java.util.Date, and you must specify a conversion ... in XML
field
descriptor. Just double check mail list archives, there are a lot of info about this
(even
docs)...
Best regards,
Edson Richter
MGR Informática Ltda
Hi Fabiano,
Try JDBC-TYPE='TIMESTAMP' - and try and use java.sql.Date instead of
java.util.Date... I
have run into problems before with java.util.Date but YMMV.
Good Luck,
Rob :)
-Original Message-
From: Fabiano Fernandes de Souza [mailto:[EMAIL PROTECTED]
Sent: Thursday, 8 January 2004 2:08 a.m.
To: [EMAIL PROTECTED]
Subject: Persisting Date and Time
I got in a value object a property named recDate of java.util.Date.
It's mapped in resource.xml as jdbc-type=DATE and
mapped in the ddl as rec_date TIMESTAMP.
I persist the object with the current Date using something
like: setRecDate(new Date()) and then I persist it using ODMG.
Everything goes fine but in the table keeps registered only
the date (not date and time) like this: 2004-01-06 00:00:00
What can I do to register the date and the time too?
Thanks.
--
Fabiano F. Souza
Tecnologia da Informação
Estudar Soluções em Treinamento Corporativo.
(31) 32849294 - [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]