You now have more values specified than
you have columns in your insert list, this could be a typo, but otherwise I
guess null gets inserted for the description column.
From: Okan Çetin
[mailto:[EMAIL PROTECTED]
Sent: donderdag 21 september 2006
2:29
To: [email protected]
Subject: Re: Postgresql serial
type problem
thanks for reply.
Problem was solved. I changed the xml file like this:
<insert
id="insertEvent" parameterClass="Event">
insert into PUBLIC.event (
description
)
values (
#event_id#, #description#
)
</insert>
On 9/21/06, Daniel
Pitts <[EMAIL PROTECTED]
> wrote:
I would guess that you should omit
event_id. Instead setting it in your java code to the return valid of the
insert() method.
From: Okan
Çetin [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 20,
2006 5:08 PM
To: [email protected]
Subject: Postgresql serial type
problem
I have a table in postgresql and in this table there
is a column that's type is serial. (event_id is serial )
I am adding data in this table like this;
<insert
id="insertEvent" parameterClass="Event">
insert into PUBLIC.event (
event_id,
description
)
values (
#event_id#, #description#
)
</insert>
Although the data is correctly inserted into the table, event_id
column is empty. In database side, event_id's type is serial, there is no
problem if I add data by manually, the event_id is automaticly increasing. In
ibatis should I do some extra config to do this?
Thanks,
Okan.
--
~
otomatik oluşturuldu:
http://ocetin.net/log
http://linux.beykent.edu.tr
--
~
otomatik oluşturuldu:
http://ocetin.net/log
http://linux.beykent.edu.tr
|