public void testOracleDateAsTimestamp() throws Exception {
Timestamp now = new Timestamp(System.currentTimeMillis() / 1000 * 1000);
// A record with nulls
// -------------------
DateAsTimestampT_976Record record = ora().newRecord(DATE_AS_TIMESTAMP_T_976);
record.setId(1);
assertEquals(1, record.store());
assertNull(record.getD());
assertNull(record.getT());
assertNull(record.getO());
record.refresh();
assertNull(record.getD());
assertNull(record.getT());
assertNull(record.getO());
assertEquals(record, ora().fetchOne(DATE_AS_TIMESTAMP_T_976, DATE_AS_TIMESTAMP_T_976.DATE_AS_TIMESTAMP_ID.equal(1)));
// A record with values
// --------------------
DateAsTimestampT_976ObjectTypeRecord o = ora().newRecord(DATE_AS_TIMESTAMP_T_976_OBJECT_TYPE);
o.setD(now);
// [#1034] TODO: Check proper use of Timestamp in array records
DateAsTimestampT_976VarrayTypeRecord t = new DateAsTimestampT_976VarrayTypeRecord(ora());
// t.set(now, now);
record = ora().newRecord(DATE_AS_TIMESTAMP_T_976);
record.setId(2);
record.setD(now);
record.setO(o);
record.setT(t);
record.store();
assertEquals(record, ora().fetchOne(DATE_AS_TIMESTAMP_T_976, DATE_AS_TIMESTAMP_T_976.DATE_AS_TIMESTAMP_ID.equal(2)));
// Procedures and packages
// -----------------------
assertEquals(now, org.jooq.test.oracle2.generatedclasses.Routines.p_976(ora(), now));