I noticed while debugging, that as I'm stepping through the XMLMappingLoader, there is a variable of type org.exolab.castor.mapping.loader.TypeInfo which has a member variable called _default. This seems to be where it is set to 0.0.

From: "Stephen Bash" <[EMAIL PROTECTED]>
Reply-To: [email protected]
To: [email protected]
Subject: Re: [castor-user] Castor defaults numeric java objects to 0
Date: Tue, 21 Mar 2006 14:18:36 -0500

Michael-

What types of objects are we referring to?  Primitives, primitive
wrappers or true objects?

Thanks,
Stephen


On 3/21/06, Michael Heath <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have XML I am unmarhsalling and when the field is empty I want to have the
> java object set to null.
>
> The default behaviour appears to be setting the java object to a 0
> value...this is of course a big problem if the value is supposed to be empty
> and not 0.
>
> Can anyone advise? I wrote a custom field handler but this seems to be
> called after the object is created and set to 0.
>
> thanks
> M
>
>
>
> -------------------------------------------------
> If you wish to unsubscribe from this list, please
> send an empty message to the following address:
>
> [EMAIL PROTECTED]
> -------------------------------------------------
>
>



-------------------------------------------------
If you wish to unsubscribe from this list, please send an empty message to the following address:

[EMAIL PROTECTED]
-------------------------------------------------

Reply via email to