I re-tested "isXXX" method, and it works fine for me with the CVS
version.
--Keith
Dowise mail user wrote:
>
> I encountered this behavior also , it seems that if you change your method
> signature to setValid(boolean)
> it'd work correctly .. anyway it breaks existing code .
>
> Also try to put "set-method" and "get-method" attributes in your field
> element , bu I'm not sure if you'll be able
> to force caster to use isXXX method instead of getXXX.
>
> I also found that the field mapping like this :
>
> <field name="id" type="string" set-method="setID" get-method="getID">
>
> is not working also (notice name of the field is "id") , it said that my
> setXXX method is invalid
> , so I wonder what's the point of having set-method and get-method ....
>
> Anyway the problem above , works OK if I change my field name to another
> name.
>
> ----- Original Message -----
> From: "paul brockmeyer" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, April 25, 2002 9:46 PM
> Subject: [castor-dev] mapping boolean primitive
>
> > i'm marshalling a Java object into xml ...
> > one of the class attributes is of type boolean (not Boolean).
> > i can marshall this via introspection with no problem,
> > but i want to add an entry to my mapping.xml (to change xml tag
> > for the field or make it an element instead of the default attribute).
> > boolean in mapping.xml (as i have below) expects java.lang.Boolean ...
> >
> > <field name="isValid" type="boolean">
> > <bind-xml name="isValid" node="element"/>
> > </field>
> >
> > any ideas on this?
> >
> > also, when relying on introspection, all attributes from the Java
> > class become attributes in the xml (as opposed to elements). is there a
> way
> > to change
> > the default to create elements?
> >
> > thanks.
> >
> > -----------------------------------------------------------
> > 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
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev