What version of torque are you using?  I assume you regenerated the Torque classes 
after you set the xml schema to numeric?  

>From my small understanding of Torque, it's defined in the schema as numeric it 
>should be using BigInteger and not int.  You might also try setting javaType="object" 
>for the relevant columns in your schema.

stu

>>> [EMAIL PROTECTED] 10/13/03 10:41AM >>>
Firts of all thank you for answering me !

But unfortunately, it doesn't resolve my problem. In My postgreSQL database,
these fields are feined as numeric, in the xml schema built, they appears
also as numerci fields !

It's after , that Torque doesn't translate correctly the type and doesn't
translate it as a Java object but in a native type !

Have you an other idea ?

Thank you by advance.

----- Original Message -----
From: "Stuart Belden" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, October 13, 2003 5:26 PM
Subject: Re: Torque mapping and null value


One solution is to map those fields using Torque's NUMERIC type instead of
INTEGER in your torque schema xml files.  NUMERIC will map to BigDecimal
instead of int.


>>> [EMAIL PROTECTED] 10/13/03 09:32AM >>>
Hello !

I have a problem concerning a null value and Toque objects.
I hava in my database tables containing fields of integer type whic can be
null. When Torque maps these objects, it doesn't map this type with the Java
objects corresponding, but with the native type. And so,  instead of
creating a null object, it assigns a zero value to this field.

Example :
    field  : name
    type : integer, can be null

   Torque : if name is null, it puts name = (int) 0
                                        and NOT name = new Integer() = null

Is there a solution to make changes in Torque objects' generation to resolve
this problem ?

Thank you by advance.

Ya�l.



---------------------------------------------------------------------
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