Greg-
I'm no expert on the nillable support in the SourceGenerator, but I'll
see if I can ask an intelligent question... If you look at the
generated classes, does the class contain a long or a Long? It
appears there is a SourceGenerator option ("asWrapper" in the code,
not sure how it is specified to the SourceGenerator) to make Castor
use primitive wrapper objects rather than the primitives themselves.
If a primitive wrapper is used I could see Castor setting the value to
null, but with a true primitive, I think 0 is the best it can do...
Don't know if that is any help at all, but I hope it accomplishes something :)
Stephen
On 4/9/06, Greg Garson <[EMAIL PROTECTED]> wrote:
> I can see some discussion on this in the mailing archive but it doesn't
> seem to answer my question. Using a SourceGen'd class containing an
> element defined as:
>
> xsd:element name="assignedToUser" type="xsd:long"
> nillable="true"></xsd:element>
>
> I pass the element instance:
>
> <assignedToUser xsi:nil="true" xmlns=""/>
>
> Castor sets the value in the resulting class to 0 instead of leaving it
> blank. Is it assumed by Castor that an empty numeric element = 0? Is
> there some setting I'm missing?
>
> Thanks,
>
> Greg
>
> -------------------------------------------------
> If you wish to unsubscribe from this list, please
> send an empty message to the following address:
>
> [EMAIL PROTECTED]
> -------------------------------------------------
>
>