agora inbox for pljava-dev@postgresql.org  
help / color / mirror / Atom feed
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: Mon, 21 Feb 2005 20:04:50 +0100
Message-ID: <421A30D2.2000804@mailblocks.com> (raw)
In-Reply-To: <1109008453.8649.7.camel@vpj.eevolution>
References: <1109008453.8649.7.camel@vpj.eevolution>

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





view thread (2+ messages)

Message-ID: <421A30D2.2000804@mailblocks.com>
Permalink:  ../421A30D2.2000804@mailblocks.com/
Also on:    postgresql.org/message-id/421A30D2.2000804@mailblocks.com

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pljava-dev@postgresql.org
  Subject: Re: [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
  In-Reply-To: <421A30D2.2000804@mailblocks.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox