Hi Alan,

Does it make a difference if you change your mapping to:

<field name="..." type="big-decimal">
  ...
</field>

We have a built-in mapping for BigDecimal, specifying java.math.BigDecimal or just "big-decimal" should work the same, but I'm curious to know if it makes a difference.

--Keith

Alan Talanoa wrote:
Sent this out a few weeks back, im hoping this might catch someones eye this 
time around.

I get the following error when calling unmarshall. The Amount element is mapped to a 
BigDecimal value. Im not sure why this would cause a problem? The string value of 
"-1000" is handled by the BigDecimal string ctor.. Any ideas?

Illegal Text data found as child of: Amount
  value: "-1000"{file: [not available]; line: 2; column: 90}


My mapping file looks like this:

        <class name="Payment">
                <map-to xml="Payment"/>
                <field name="amount" type="java.math.BigDecimal">
                        <bind-xml name="Amount" node="element"/>
        </class>

And the XML is:
<Payments>
<Payment>
<Amount>-1000</Amount>      
</Payment>


------------------------------------------------------------------------

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



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

Reply via email to