Eric,
     Thanks, it is working fine now!
[]'s
Frederico Augusto Costa
------
    Sometimes the best medicine is to stop taking something.

----- Original Message -----
From: "Eric Emminger" <[EMAIL PROTECTED]>
To: "Apache Torque Users List" <[EMAIL PROTECTED]>
Sent: Monday, August 18, 2003 3:54 PM
Subject: Re: Inserting NULL for foreign refereces


> Frederico
>
> >     I have a silly question and I was not able to find a similar case on
> > list archive.
> > I have a table A with the following columns:
> > A_ID                      INTEGER PRIMARY NOT NULL
> > A_NAME              VARCHAR(X) NOT NULL
> > B_ID                      INTEGER NULL (Is a foreign reference for B_ID
from
> > table B)
> >
> > I also have a table B:
> > B_ID                      INTEGER PRIMARY NOT NULL
> > B_NAME              VARCHAR(X) NOT NULL
> >
> > When I try to insert values on table A as following, I get a referential
> > integrity violation:
> > A a = new A()
> > a.setAName("XXXX");
> > a.save();
> >
> > I think Torque is trying to insert 0 on B_ID (default values from new
> > integer types are 0) but
> > I really want to set it NULL.
> > Any clues?
>
> In your schema xml, are you using javaType="object" for the primary- and
> foreign-key columns?
>
> Eric
>
>
> ---------------------------------------------------------------------
> 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