[Pljava-dev] Re: Problem [SELECT - 0 row(s), 0.019 secs] [Error Code: 0, SQL State: 42601] ERROR: Default type java.math.BigDecimal cannot be replaced by int

From: thhal at mailblocks(dot)com (Thomas Hallgren)
To:
Subject: [Pljava-dev] Re: Problem [SELECT - 0 row(s), 0.019 secs] [Error Code: 0, SQL State: 42601] ERROR: Default type java.math.BigDecimal cannot be replaced by int
Date: 2005-02-21 19:04:50
Message-ID: 421A30D2.2000804@mailblocks.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pljava-dev

Victor,
> but recieved this error: (Default type java.math.BigDecimal cannot be
> replaced by int)
>
> I think the problem is my o.C_Currency_ID is a type NUMERIC, but my
> method as for int. I do not want to change all my methods.
>
Yes, your suspicion is correct. The NUMERIC is mapped to BigDecimal by
default.

> Can You tell me How can I change to Default type or make some type of
> mapping using pljava?
>
This is something that's still on the TODO list I'm afraid. PLJava comes
with limited mapping capabilities today. So either you take the pain in
SQL (and declare your SQL functions with int parameters) or in Java and
use BigDecimal to receive the NUMERIC.

Regards,
Thomas Hallgren

In response to

Browse pljava-dev by date

  From Date Subject
Next Message Rodrigo Foscarini 2005-02-22 21:32:12 [Pljava-dev] pl/java and oracle compatibility
Previous Message Victor 2005-02-21 17:54:12 [Pljava-dev] Problem [SELECT - 0 row(s), 0.019 secs] [Error Code: 0, SQL State: 42601] ERROR: Default type java.math.BigDecimal cannot be replaced by int