SQLMAP IBATIS insert values from web forms to a money type column

Поиск
Список
Период
Сортировка
Искать

SQLMAP IBATIS insert values from web forms to a money type column

От:
Emi Lu <emilu@encs.concordia.ca>
Дата:
Hello,

I am using SQLMAP ibatis to do DB insertion for a webapplication.

In my sqlmap.xml file, I was trying to insert values into a table with 
one col (type is Money), but in java, I could not find Money type.

Does someone knows about ibatis how to make values got from the web form 
to be inserted into money type column through IBATIS ?

Thanks a lot!

Re: SQLMAP IBATIS insert values from web forms to a money type

От:
David Gagnon <dgagnon@siunik.com>
Дата:
Hi,

  I think you should use BigDecimal ...

/David

Emi Lu wrote:
> Hello,
>
> I am using SQLMAP ibatis to do DB insertion for a webapplication.
>
> In my sqlmap.xml file, I was trying to insert values into a table with 
> one col (type is Money), but in java, I could not find Money type.
>
> Does someone knows about ibatis how to make values got from the web 
> form to be inserted into money type column through IBATIS ?
>
> Thanks a lot!
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
>       subscribe-nomail command to majordomo@postgresql.org so that your
>       message can get through to the mailing list cleanly
>
>
>


Re: SQLMAP IBATIS insert values from web forms to a money

От:
Emi Lu <emilu@encs.concordia.ca>
Дата:

>
>  I think you should use BigDecimal ...
>
>
I tried java.math.BigDeciaml. It does not work for me, I still get the 
exceptions:
column "salary_amount" is of type money but expression is of type numeric

>
> Emi Lu wrote:
>> Hello,
>>
>> I am using SQLMAP ibatis to do DB insertion for a webapplication.
>>
>> In my sqlmap.xml file, I was trying to insert values into a table 
>> with one col (type is Money), but in java, I could not find Money type.
>>
>> Does someone knows about ibatis how to make values got from the web 
>> form to be inserted into money type column through IBATIS ?
>>
>> Thanks a lot!
>>
>>
>> ---------------------------(end of broadcast)---------------------------
>> TIP 1: if posting/reading through Usenet, please send an appropriate
>>       subscribe-nomail command to majordomo@postgresql.org so that your
>>       message can get through to the mailing list cleanly
>>
>>
>>
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: In versions below 8.0, the planner will ignore your desire to
>       choose an index scan if your joining column's datatypes do not
>       match

Re: SQLMAP IBATIS insert values from web forms to a money

От:
Paul Thomas <paul@tmsl.demon.co.uk>
Дата:

On 14/08/2006 15:06 Emi Lu wrote:
> I tried java.math.BigDeciaml. It does not work for me, I still get the 
> exceptions:
> column "salary_amount" is of type money but expression is of type numeric

The PostgreSQL docs clearly state that money is a deprecated type and that 
you should use numeric instead. Use a column type of numeric and a Java 
type of BigDecimal.

-- 
Paul Thomas
+------------------------------+-------------------------------------------+
| Thomas Micro Systems Limited | Software Solutions for Business           |
| Computer Consultants         | http://www.thomas-micro-systems-ltd.co.uk |
+------------------------------+-------------------------------------------+
FAQ