I have this problem also.  My only experience is with mysql so far, but
it appears that the schema generated by the ant 'jdbc' target always has
default values and never sets the 'javaType' attribute to "object".
As a result you have to make those changes manually or with an XSLT
script.  I attached the XSLT script I use to a recent post to the list;
if you can't find it in an archive somewhere let me know and I'll email
it to you off the list.

        Gary

[2003-12-09 19:27 +0100] Tillich, Adrian ([EMAIL PROTECTED]) wrote:
> Hi,
> 
> I have this problem:
> an insert on a simple database table 
> like this:
>       CREATE TABLE CITY_MAP
>       (
>               CITY_NAME       varchar(20)     NOT NULL,
>               CITY_ID int             NULL,
>               
>               CONSTRAINT PK_MAP
>                       PRIMARY KEY NONCLUSTERED (CITY_NAME)
>       )
>       go
> 
>       ALTER TABLE CITY_MAP
>            ADD FOREIGN KEY (CITY_ID)
>                   REFERENCES CITY_ID
>       go
> 
> fails, because Torque sets the foreign key field CITY_ID to a numeric 0
> instead of NULL.
> This is probably because the corresponding Torque-Peerclass uses the flat
> datatypes instead of the Objects for numeric datatypes.
> 
> Can I somehow configure this behaviour or is there a workaround?
> 
> Changing the database model is not really an option because I use an
> existing one.
> 
> Thanks,
> Adrian
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to