pg.ddx.io pgsql-jdbc@postgresql.org mailing list archive
help / color / mirror / Atom feedSQLMAP IBATIS insert values from web forms to a money type column
4+ messages / 3 participants
[nested] [flat]
* SQLMAP IBATIS insert values from web forms to a money type column
@ 2006-08-14 13:51 Emi Lu <emilu@encs.concordia.ca>
0 siblings, 1 reply; 4+ messages in thread
From: Emi Lu @ 2006-08-14 13:51 UTC (permalink / raw)
To: pgsql-jdbc
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!
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: SQLMAP IBATIS insert values from web forms to a money type
@ 2006-08-14 13:58 David Gagnon <dgagnon@siunik.com>
parent: Emi Lu <emilu@encs.concordia.ca>
0 siblings, 1 reply; 4+ messages in thread
From: David Gagnon @ 2006-08-14 13:58 UTC (permalink / raw)
To: emilu@encs.concordia.ca; +Cc: pgsql-jdbc
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
>
>
>
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: SQLMAP IBATIS insert values from web forms to a money
@ 2006-08-14 14:06 Emi Lu <emilu@encs.concordia.ca>
parent: David Gagnon <dgagnon@siunik.com>
0 siblings, 1 reply; 4+ messages in thread
From: Emi Lu @ 2006-08-14 14:06 UTC (permalink / raw)
To: David Gagnon <dgagnon@siunik.com>; +Cc: pgsql-jdbc
>
> 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
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: SQLMAP IBATIS insert values from web forms to a money
@ 2006-08-20 20:11 Paul Thomas <paul@tmsl.demon.co.uk>
parent: Emi Lu <emilu@encs.concordia.ca>
0 siblings, 0 replies; 4+ messages in thread
From: Paul Thomas @ 2006-08-20 20:11 UTC (permalink / raw)
To: emilu@encs.concordia.ca; +Cc: David Gagnon <dgagnon@siunik.com>; pgsql-jdbc
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 |
+------------------------------+-------------------------------------------+
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2006-08-20 20:11 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-08-14 13:51 SQLMAP IBATIS insert values from web forms to a money type column Emi Lu <emilu@encs.concordia.ca>
2006-08-14 13:58 ` Re: SQLMAP IBATIS insert values from web forms to a money type David Gagnon <dgagnon@siunik.com>
2006-08-14 14:06 ` Re: SQLMAP IBATIS insert values from web forms to a money Emi Lu <emilu@encs.concordia.ca>
2006-08-20 20:11 ` Re: SQLMAP IBATIS insert values from web forms to a money Paul Thomas <paul@tmsl.demon.co.uk>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox