I stumbled into the same problems in Version 2.1.2. In Version 2.1.4 the mapping still is the same:
Code in constructor of Oracle9Dialect
Code:
registerColumnType( Types.DATE, "DATE" );
registerColumnType( Types.TIME, "DATE" );
registerColumnType( Types.TIMESTAMP, "DATE" );
From the OracleDocuments at [url]http://download-west.oracle.com/docs/cd/A91202_01/901_doc/server.901/a90125/sql_elements2.htm#54201
[/url]
DATE : Valid date range from January 1, 4712 BC to December 31, 9999 AD.
TIMESTAMP (fractional_seconds_precision) : Year, month, and day values of date, as well as hour, minute, and second values of time, where fractional_seconds_precision is the number of digits in the fractional part of the SECOND datetime field. Accepted values of fractional_seconds_precision are 0 to 9. The default is 6.
Thus oracle offers nanosecond precision.
I fixed it by subclassing with a constructor:
Code:
public MyDialect() {
super() ;
registerColumnType( Types.DATE, "TIMESTAMP(3)" );
}
as I just needed the java.util.Date equivalent.