You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-user@db.apache.org by Stan Wiechers <St...@rga.com> on 2005/08/30 17:37:24 UTC

primitive null values

Hey,

so I'm binding a sql file to a schema xml and that to the generated classes for a oracle db.  I have a bunch of Integer columns in my table which can be null, however since the Integer column is bound to a primitive int I see now way of saying null.

So I guess my question is do I need to change mapping of certain oracle types to a java objects like java.lang.Integer rather then primitives? If yes, what is the easiest way to achieve that? And shouldn't that be default behaviour?

Looking forward to hear back from you guys,
Stan


This message is the property of R/GA and contains information which may be privileged or confidential. It is meant only for the intended recipients and/or their authorized agents. If you believe you have received this message in error, please notify us immediately by return e-mail or by forwarding this message to postmaster@rga.com, and destroy any printed or electronic copies of the message. Any unauthorized use, dissemination, disclosure, or copying of this message or the information contained in it, is strictly prohibited and may be unlawful. Thank you.


This message is the property of R/GA and contains information which may be privileged or confidential. It is meant only for the intended recipients and/or their authorized agents. If you believe you have received this message in error, please notify us immediately by return e-mail or by forwarding this message to postmaster@rga.com, and destroy any printed or electronic copies of the message. Any unauthorized use, dissemination, disclosure, or copying of this message or the information contained in it, is strictly prohibited and may be unlawful. Thank you.


Re: primitive null values

Posted by Thomas Fischer <tf...@apache.org>.
Hi,

I guess the best anwer which can be giveb here is that the behaviour is 
historical and noone dared to touch it till now.

My advice would be to map these columns on objects using the
javaType="object" attribute for these columns in your schema.xml

    Thomas


On Tue, 30 Aug 2005, Stan Wiechers wrote:

> Hey,
>
> so I'm binding a sql file to a schema xml and that to the generated 
> classes for a oracle db.  I have a bunch of Integer columns in my table 
> which can be null, however since the Integer column is bound to a 
> primitive int I see now way of saying null.
>
> So I guess my question is do I need to change mapping of certain oracle 
> types to a java objects like java.lang.Integer rather then primitives? 
> If yes, what is the easiest way to achieve that? And shouldn't that be 
> default behaviour?
>
> Looking forward to hear back from you guys,
> Stan
>
>
> This message is the property of R/GA and contains information which may 
> be privileged or confidential. It is meant only for the intended 
> recipients and/or their authorized agents. If you believe you have 
> received this message in error, please notify us immediately by return 
> e-mail or by forwarding this message to postmaster@rga.com, and destroy 
> any printed or electronic copies of the message. Any unauthorized use, 
> dissemination, disclosure, or copying of this message or the information 
> contained in it, is strictly prohibited and may be unlawful. Thank you.
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org