|
From: Seaman, S. <Slo...@pt...> - 2004-08-12 17:36:15
|
I've got a column that is of type Integer (Number in oracle) and if I try to
make the bean that uses the field persistent I get an Invalid Column Type
error if I do not set the field, or set it to null.
So, to be more descriptive:
I've got a jdo bean (ClinicalTrial.java) with the field:
setPatientRace(Race race); which is a FK to the table RACE.
If I do a:
setPatientRace(null)
And then makePersistent, I get the error. Here is the generates SQL
statements:
INSERT INTO CLINICAL_TRIAL
(CLINICAL_TRIAL_ID,COMPLETED_BY,COMPLETED_DATETIME,ACCESSION_ID,PATIENT_INIT
IALS,PHYSICIAN,LOCATION,TISSUE_EXTRACTION_DATE,PATIENT_DATE_OF_BIRTH,PATIENT
_RACE_ID) VALUES (?,?,?,?,?,?,?,?,?,?)
{ CLINICAL_TRIAL_ID=11 COMPLETED_BY=S COMPLETED_DATETIME=Thu Aug 12 13:27:39
EDT 2004 ACCESSION_ID=retgret PATIENT_INITIALS=asd PHYSICIAN=sdfv
LOCATION=sdfv TISSUE_EXTRACTION_DATE=Fri Aug 20 00:00:00 EDT 2004
PATIENT_DATE_OF_BIRTH=Fri Aug 20 00:00:00 EDT 2004 PATIENT_RACE_ID=null }
I'm guessing this is an issue with Oracle not liking nulls in FK's or
Numbers, but how do I get around this?
I tried setting non-null for the field in the xorm configuration file but
that didn't do anything..
Ideas?
Thanks...
--
Sloan
|