Hi
I apologize if this question has been answered already. I searched through the forums all of yesterday and googled with no luck.
I am running an Oracle 9i database and using a 10G driver - ojdbc14_10-2-0-3.jar (copied to lib folder) , we are upgrading our database to 10G soon.
I'm attempting to reverse gen my schema into model classes. I am also a custom strategy ( copied from a forum post here ) that annotates my version column correctly.
All my tables have timestamp columns for audit.
Code:
CREATE TABLE CATALOG
(
CATALOG_ID INTEGER NOT NULL,
CATALOG_NAME VARCHAR2(50 BYTE) NOT NULL,
DATE_CREATED TIMESTAMP(6) DEFAULT systimestamp NOT NULL,
ADDED_BY INTEGER NOT NULL,
DATE_MODIFIED TIMESTAMP(6) DEFAULT systimestamp NOT NULL,
MODIFIED_BY INTEGER NOT NULL,
ENABLED CHAR(1 BYTE) DEFAULT 'N' NOT NULL,
VERSION_ID INTEGER DEFAULT 1 NOT NULL
);
The generated code maps my timestamp columns to Serializable
Code:
@Column(name = "DATE_CREATED", nullable = false)
@NotNull
public Serializable getDateCreated() {
return this.dateCreated;
}
I understand this is an Oracle problem, but is there anyone who has a workaround for this ?
If I do change these fields to Date type, I do get the expected results.
My gut tells me that I should change my fields to Date type. The only issue I still see is that even with Date fields, the generated methods are not annotated with @Temporal(TemporalType.TIMESTAMP)
Can anyone offer some advice ?
Thanks
Franco