[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

Thomas Hallgren thhal at mailblocks.com
Mon Feb 21 19:04:50 UTC 2005


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




More information about the Pljava-dev mailing list