Hi,

  Use this attribute in the database tag.
defaultJavaType="object"

There is a variant of this that can be used for a single table. Check
out the mail archives. I have asked the exact same question before.

-Sarav

On Mon, 2004-12-06 at 09:48, [EMAIL PROTECTED] wrote:
> Daniel-
> 
> When generating you object using the om task, make sure you're using 
> 
>       <database name="xxx" defaultJavaType="object">
> 
> <project>-schema.xml
> 
> The "object" java type allows null values.
> 
> Michael
> 
> -----Original Message-----
> From: Vitzethum, Daniel [mailto:[EMAIL PROTECTED]
> Sent: Monday, December 06, 2004 7:22 AM
> To: Apache Torque Users List
> Subject: Torque tries to insert 0 into nullable Foreign Key
> 
> 
> Hello list,
> 
> one more question:
> 
> I have a schema with nullable foreign keys of type "INTEGER".
> When saving a new object, Torque's buildCriteria method inserts
> 0 as the according column's value, what is wrong as it should be
> null. Even defaults in DB don't work therefore.
> 
> My Oracle DB refuses to insert 0 as the foreign key constraint is
> violated, what is the right behavior.
> 
> Any ideas how to deal with that?
> 
> 
> Thanks in advance,
> 
> Daniel
> 
> 
> ---------------------------------------------------------------------
> 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]
> 
> 


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

Reply via email to