Yes, my understanding is that the datetime type provides a good mapping for a java.sql.Timestamp object, despite the difference in naming.
The MySQL timestamp type holds similar data, but has a bunch of strange restrictions around how default values are declared, and how multiple timestamp columns behave in the same table. Here's a good quote:
For any other RDBMS I'd agree with Lew, but MySQL has some brain
damage in this department. In MySQLese, DATETIME is the type allowing
'2008-03-17 00:03:14' for a large range of dates and times, with one-
second resolution (corresponding to the SQL TIMESTAMP type), and
TIMESTAMP is the MySQL mapping of its implementation's time_t type (on
most unices, a 32-bit int representing seconds since 1970).
MySQL TIMESTAMPs also have some constraints about how many of them you
can have and in what order, within a table, which is completely inane
and makes the type hard to use for general-purpose storage of
timestamps – MySQL very strongly assumes TIMESTAMP means "timetamp of
the creation of this row".
The MySQL java connector should have some documentation indicating how
DATETIME columns map to JDBC types – I wouldn't be surprised if the
java.sql.Timestamp type was an appropriate mapping (along with
Looking at the mysql jdbc driver docs (http://dev.mysql.com/doc/refman/5.0/en/connector-j-reference-type-conversions.html) and both DATETIME and TIMESTAMP are indicated to map to a java.sql.Timestamp.
I think it would be best to use DATETIME throughout the schema-mysql.sql I did a search/replace in mine just now, and things are running ok for the small amount of Batch I'm using so far.