As described here
http://stackoverflow.com/questions/33232260/temporaltemporaltype-date-with-oracle-12
Oracle changed its handling of Date again with the 12.x drivers. The code
OracleDataSource ods = new OracleDataSource();
...
Connection conn = ods.getConnection();
PreparedStatement ps = conn.prepareStatement("UPDATE MyEntity SET importantDate = ? WHERE myentityId = 4385");
ps.setDate(1, new java.sql.Date(new java.util.Date().getTime()));
ps.execute();
sets importantDate to a date with 00:00:00 when using 11.x - drivers, but 12.x saves the current time as well. As a result, date fields in entities annotated @Temporal(TemporalType.DATE) don't cut off the time part anymore.
Oracle12cDialect should provide a workaround to restore the intended behaviour.
|