I've got the 2nd problem!!!
But I couldn't change to the DATETIME datatype, it doesn't log the hhmmss value.
How did u solve it eventually???
I think you're a little confused (or I'm confused). The jdbc-type has nothing to do with the actual column type. It is used to get the JDBC driver to coerce the actual type passed in into something the database actually wants. TIMESTAMP is the only jdbc type (java.sql.Types) that supports both date and time data in the same column. The DATE and TIME types only set the date and time parts of a java.util.Date respectively.
I don't use mySQL so this may be a mySQL weirdism. If you find a better mapping, please post a bug report at SourceForge.
Just use this mapping for mySQL:
and that will do the job you want!
I got the same problem with Timestamp and I switched to java.util.Date. But when it is saving the datetime to database it is 1 hour off the original date!!!!, like it is something wrong with the machine....Both Jboss and mySQL are on the same machine...Any ideeas please?