BUG #3636: createNativeQuery - don't work with INSERT INTO.

From: "Michael "Zorkus" Antonov" <olorinbant(at)gmail(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #3636: createNativeQuery - don't work with INSERT INTO.
Date: 2007-09-26 15:45:56
Message-ID: 200709261545.l8QFjuRQ010236@wwwmaster.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


The following bug has been logged online:

Bug reference: 3636
Logged by: Michael "Zorkus" Antonov
Email address: olorinbant(at)gmail(dot)com
PostgreSQL version: 8.2.*
Operating system: Fedora Core 7, kernel 2.6.22.4-64.fc7, x86-32
Description: createNativeQuery - don't work with INSERT INTO.
Details:

When i doing query -
em.createNativeQuery(
"INSERT INTO contest_languages VALUES(?1 , ?2)"
).setParameter(1, contest.getContestId()).
setParameter(2 , la.getLanguageId()).
executeUpdate();

i receive this message -
Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2006.8 (Build
060830)): oracle.toplink.essentials.exceptions.DatabaseException
Internal Exception: org.postgresql.util.PSQLException: ERROR:
UNIQUE
"contest_languages_pkey"Error Code: 0
Call:INSERT INTO contest_languages VALUES(? , ?)
bind => [1, basic]
But i haven't this PK! and same query, mading from pgAdmin, work good. Why??

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Heikki Linnakangas 2007-09-26 16:23:28 Re: BUG #3619: Renaming sequence does not update its 'sequence_name' field
Previous Message Tom Lane 2007-09-26 14:31:54 Re: BUG #3619: Renaming sequence does not update its 'sequence_name' field