• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
PostgreSQL & duplicate primary key error
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

PostgreSQL & duplicate primary key error


  • Subject: PostgreSQL & duplicate primary key error
  • From: François Reboursier <email@hidden>
  • Date: Wed, 2 Aug 2006 12:09:13 +0200

	Hi list,

I'm running accross a strange problem: when inserting multiple objects of the same class to the DB, I get the following exception:
"SQL State:23505 -- error code: 0 -- msg: ERROR: duplicate key violates unique constraint "moduleinmodule_pk""
When inserting one object at time, it works great.


Example in less-than-pseudo-code:

Create instance of object
Insert object to editing context
Modify object
Create other instance of the same class
Insert to EC
Modify object
EC.saveChanges()
 => crash

Create instance of object
Insert object to editing context
Modify object
EC.saveChanges()
=> it works

The EOModel is properly configured, the primary key is not editable
It happens only with objects of this class ('moduleinmodule')

Configuration: WO 5.3.1, PostgreSQL 8.0.1

	Do you have any pointers?

Regards,
François _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: PostgreSQL & duplicate primary key error
      • From: Miguel Arroz <email@hidden>
  • Prev by Date: Re: Mysterious EditingContext Swap
  • Next by Date: Re: PostgreSQL & duplicate primary key error
  • Previous by thread: Re: Mysterious EditingContext Swap
  • Next by thread: Re: PostgreSQL & duplicate primary key error
  • Index(es):
    • Date
    • Thread