I don't experience the behavior you are describing. I wrapped your
element declaration in a schema, created a fake type for
type_email_address, and generated the source code. I created a new
instance of a Root object which contains the email_address and
getEmail_addressCount() returns 0 for me.

Which version of Castor are you using?

How are you constructing the object (what does your code look like)?

--Keith

Jenny Linfoot wrote:
> 
> I have an element defined that is unbounded.
> 
> <element name="email_address" type="common:type_email_address" minOccurs=
> "0" maxOccurs="unbounded">
> 
> I have run this through castor and when I construct one of the objects that
> contains an email_address, but without setting the email_address field,
> then myObject.getEmail_addressCount() returns 1 and this email_address
> contains the value "null".  I was expecting getEmail_addressCount() to
> return 0.  Can you explain what's happening here please?
> 
> Thanks
> 
> Jenny
> 
> -----------------------------------------------------------
> If you wish to unsubscribe from this mailing, send mail to
> [EMAIL PROTECTED] with a subject of:
>         unsubscribe castor-dev

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to