You could also try changing your sqlmap parameter to
<parameter property="financialSocialsecurity" javaType="decimal"
jdbcType="NUMERIC" mode="OUT"/>
This works for us in many places, using Oracle DB.
-ed
On 7/27/05, Daniel Henrique Ferreira e Silva <[EMAIL PROTECTED]> wrote:
> Hi Shilpa,
>
> Really, this issue seems way weird.
> I have some points, maybe all wrong, but they are my best shots:
>
> 1) This problem may be caused by a buggy jdbc driver;
> 2) This problem may be caused by a bug in iBATIS (probably not or
> someone would already pointed it);
>
> Besides those points, have you tried changing your property from
> BigDecimal to Double?
> What happens after that change?
>
> Cheers,
> Daniel Silva.
>
> On 7/27/05, shilpa <[EMAIL PROTECTED]> wrote:
> > Daniel Henrique Ferreira e Silva <dhsilva <at> gmail.com> writes:
> >
> > >
> > > Shilpa,
> > >
> > > That is exactly the point Larry tried to show you. As your BigDecimal
> > > has scale 0, it shows you only the integer part of the value. Set it
> > > to 2, for example, in your setter:
> > >
> > > public void setMyBigDecimalProperty(BigDecimal val) {
> > > this.myBigDecimalProperty = val;
> > > this.myBigDecimalProperty.setScale(2);
> > > }
> > >
> > > Apparently, that will solve your issue.
> > > Let me know what you get doing that.
> > >
> > > Cheers,
> > > Daniel Silva.
> > >
> > > On 7/27/05, shilpa <shilpa.pradhan <at> judiciary.state.nj.us> wrote:
> > > > Larry Meadors <larry.meadors <at> gmail.com> writes:
> > > >
> > > > >
> > > > > What I mean is if you set the scale on the object, is the real value
> > there?
> > > > > yourBigDecimal.setScale(2);
> > > > > Larry
> > > >
> > > >
> > > > I am geting only 99 from iBatis, not 99.11
> > > > I am printing what I am getting in set method of value object, and its
> > showing
> > > > me just 99. I called scale() method on BigDecimal object returned by
> > > > iBatis,
> > > > and its giving me '0'.
> > > >
> > > > What could be the problem?
> > > >
> > > > Lot of other people at my work place is also facing the same problem.
> > > >
> > > > Can anyone help us regarding this?
> > > >
> > > > Thanks,
> > > > Shilpa
> > > >
> > > >
> > > >
> > > >
> > > >
> > >
> > >
> >
> > now its giving me 99.00 and not 99.11
> >
> > This is my set method
> >
> > public void setFinancialSocialsecurity(BigDecimal decimal) {
> >
> > System.out.println("setfinancialSocialsecurity " + decimal);
> >
> > financialSocialsecurity = decimal.setScale(2);
> > System.out.println("setfinancialSocialsecurity scale" +
> > decimal.scale());
> > }
> >
> >
> >
> >
> >
> >
> >
>