Title: RE: [castor-dev] mapping boolean primitive
 Oh and in  0.9.3.9 , the isXXX thing works OK for Boolean object ...
 but not the primitive one. 
----- Original Message -----
Sent: Friday, April 26, 2002 12:59 PM
Subject: Re: [castor-dev] mapping boolean primitive

I use castor-0.9.3 and to use isXXX I do the get-method="isXXX", set-method="setXXX" thing, which works just fine.

However, I reported this being broken in CVS late last year, and it was still the case in 0.9.3.9.

I haven't checked CVS lately... after getting 0.9.3 working nicely for the most part I'm staying with the devil I know :) Once 0.9.4 makes it out I'll give it another spin, but mentioning "CVS version" to the tech. manager when discussing a production system tends cause deep psychological pain :)

Hope this clears it up - I might see if I can take the CVS version for a spin later today and see if that problem still exists.

Cheers,
Brett

-----Original Message-----
From: Keith Visco [mailto:[EMAIL PROTECTED]]
Sent: Friday, 26 April 2002 3:46 PM
To: [EMAIL PROTECTED]
Subject: Re: [castor-dev] mapping boolean primitive



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

Reply via email to