Unix Technical Forum

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

This is a discussion on BUG #3636: createNativeQuery - don't work with INSERT INTO. within the pgsql Bugs forums, part of the PostgreSQL category; --> The following bug has been logged online: Bug reference: 3636 Logged by: Michael "Zorkus" Antonov Email address: olorinbant@gmail.com PostgreSQL ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Bugs

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-10-2008, 11:09 AM
Michael Zorkus Antonov
 
Posts: n/a
Default BUG #3636: createNativeQuery - don't work with INSERT INTO.


The following bug has been logged online:

Bug reference: 3636
Logged by: Michael "Zorkus" Antonov
Email address: olorinbant@gmail.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.DatabaseExcep tion
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??

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-10-2008, 11:09 AM
Tom Lane
 
Posts: n/a
Default Re: BUG #3636: createNativeQuery - don't work with INSERT INTO.

"Michael "Zorkus" Antonov" <olorinbant@gmail.com> writes:
> i receive this message -
> Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2006.8 (Build
> 060830)): oracle.toplink.essentials.exceptions.DatabaseExcep tion
> Internal Exception: org.postgresql.util.PSQLException: ERROR:
> повторный ключ нарушает констрейнт UNIQUE


Sorry, this is not an Oracle support forum.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 02:44 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com